Struct solana_test_utils::merkle_tree::SolanaHasher
source · [−]pub struct SolanaHasher;Trait Implementations
sourceimpl Clone for SolanaHasher
impl Clone for SolanaHasher
sourcefn clone(&self) -> SolanaHasher
fn clone(&self) -> SolanaHasher
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Hasher for SolanaHasher
impl Hasher for SolanaHasher
type Hash = [u8; 32]
type Hash = [u8; 32]
This type is used as a hash type in the library.
It is recommended to use fixed size u8 array as a hash type. For example,
for sha256 the type would be [u8; 32], representing 32 bytes,
which is the size of the sha256 digest. Also, fixed sized arrays of u8
by default satisfy all trait bounds required by this type. Read more
sourcefn hash(data: &[u8]) -> Self::Hash
fn hash(data: &[u8]) -> Self::Hash
This associated function takes a slice of bytes and returns a hash of it.
Used by concat_and_hash function to build a tree from concatenated hashes Read more
sourcefn concat_and_hash(left: &Self::Hash, right: Option<&Self::Hash>) -> Self::Hash
fn concat_and_hash(left: &Self::Hash, right: Option<&Self::Hash>) -> Self::Hash
Used by MerkleTree and PartialTree when calculating the root.
The provided default implementation propagates the left node if it doesn’t
have a sibling. The left node should always be present. The right node is optional. Read more
Auto Trait Implementations
impl RefUnwindSafe for SolanaHasher
impl Send for SolanaHasher
impl Sync for SolanaHasher
impl Unpin for SolanaHasher
impl UnwindSafe for SolanaHasher
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more