Skip to main content

MerkleMountainRangeBytes

Struct MerkleMountainRangeBytes 

Source
pub struct MerkleMountainRangeBytes<const MAX_N: u64, H>(/* private fields */)
where
    H: MerkleHasher;
Expand description

Byte representation of MerkleMountainRange with correct alignment.

Somewhat similar in function to MmrPeaks, but for local use only.

Trait Implementations§

Source§

impl<const MAX_N: u64, H> Clone for MerkleMountainRangeBytes<MAX_N, H>
where H: MerkleHasher + Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const MAX_N: u64, H> Copy for MerkleMountainRangeBytes<MAX_N, H>
where H: MerkleHasher + Copy,

Source§

impl<const MAX_N: u64, H> Debug for MerkleMountainRangeBytes<MAX_N, H>
where H: MerkleHasher + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const MAX_N: u64, H> Default for MerkleMountainRangeBytes<MAX_N, H>
where H: MerkleHasher,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<const MAX_N: u64, H> Deref for MerkleMountainRangeBytes<MAX_N, H>
where H: MerkleHasher,

Source§

type Target = [u8; _]

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<const MAX_N: u64, H> DerefMut for MerkleMountainRangeBytes<MAX_N, H>
where H: MerkleHasher,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<const MAX_N: u64, H> From<MerkleMountainRangeBytes<MAX_N, H>> for [u8; _]
where H: MerkleHasher,

Source§

fn from(value: MerkleMountainRangeBytes<MAX_N, H>) -> Self

Converts to this type from the input type.
Source§

impl<const MAX_N: u64, H> From<[u8; _]> for MerkleMountainRangeBytes<MAX_N, H>
where H: MerkleHasher,

Source§

fn from(value: [u8; _]) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<const MAX_N: u64, H> Forget for MerkleMountainRangeBytes<MAX_N, H>

§

impl<const MAX_N: u64, H> Freeze for MerkleMountainRangeBytes<MAX_N, H>
where [u8; _]: Freeze,

§

impl<const MAX_N: u64, H> RefUnwindSafe for MerkleMountainRangeBytes<MAX_N, H>
where [u8; _]: RefUnwindSafe,

§

impl<const MAX_N: u64, H> Send for MerkleMountainRangeBytes<MAX_N, H>
where [u8; _]: Send,

§

impl<const MAX_N: u64, H> Sync for MerkleMountainRangeBytes<MAX_N, H>
where [u8; _]: Sync,

§

impl<const MAX_N: u64, H> Unpin for MerkleMountainRangeBytes<MAX_N, H>
where [u8; _]: Unpin,

§

impl<const MAX_N: u64, H> UnsafeUnpin for MerkleMountainRangeBytes<MAX_N, H>
where [u8; _]: UnsafeUnpin,

§

impl<const MAX_N: u64, H> UnwindSafe for MerkleMountainRangeBytes<MAX_N, H>
where [u8; _]: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<H> NewMerkleHasherForTreeSize for H
where H: Default,

Source§

fn new_for_tree_size(_num_leaves: u64) -> H

Create a hasher for a tree with num_leaves leaves
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.