pub struct HasherNode<H>(/* private fields */)
where
H: Digest;
Expand description
Newtype wrapper for hash output that impls NodeValue
.
Trait Implementations§
Source§impl<H> AsRef<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
H: Digest,
Allow access to the underlying [Output
]
impl<H> AsRef<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
H: Digest,
Allow access to the underlying [Output
]
Source§impl<H> CanonicalDeserialize for HasherNode<H>where
H: Digest,
impl<H> CanonicalDeserialize for HasherNode<H>where
H: Digest,
Source§fn deserialize_with_mode<R: Read>(
reader: R,
_compress: Compress,
_validate: Validate,
) -> Result<Self, SerializationError>
fn deserialize_with_mode<R: Read>( reader: R, _compress: Compress, _validate: Validate, ) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Source§impl<H> CanonicalSerialize for HasherNode<H>where
H: Digest,
impl<H> CanonicalSerialize for HasherNode<H>where
H: Digest,
Source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
_compress: Compress,
) -> Result<(), SerializationError>
fn serialize_with_mode<W: Write>( &self, writer: W, _compress: Compress, ) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.
fn serialized_size(&self, _compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
Source§impl<H> Clone for HasherNode<H>where
H: Digest,
impl<H> Clone for HasherNode<H>where
H: Digest,
Source§impl<H> Debug for HasherNode<H>where
H: Digest,
impl<H> Debug for HasherNode<H>where
H: Digest,
Source§impl<H> Default for HasherNode<H>where
H: Digest,
impl<H> Default for HasherNode<H>where
H: Digest,
Source§impl<'de, H> Deserialize<'de> for HasherNode<H>where
H: Digest,
impl<'de, H> Deserialize<'de> for HasherNode<H>where
H: Digest,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<E, I, H> DigestAlgorithm<E, I, HasherNode<H>> for HasherDigestAlgorithm
impl<E, I, H> DigestAlgorithm<E, I, HasherNode<H>> for HasherDigestAlgorithm
Source§fn digest(data: &[HasherNode<H>]) -> Result<HasherNode<H>, MerkleTreeError>
fn digest(data: &[HasherNode<H>]) -> Result<HasherNode<H>, MerkleTreeError>
Digest a list of values
Source§fn digest_leaf(pos: &I, elem: &E) -> Result<HasherNode<H>, MerkleTreeError>
fn digest_leaf(pos: &I, elem: &E) -> Result<HasherNode<H>, MerkleTreeError>
Digest an indexed element
Source§impl<H> Display for HasherNode<H>where
H: Digest,
impl<H> Display for HasherNode<H>where
H: Digest,
Source§impl<H> From<&HasherNode<H>> for TaggedBase64where
H: Digest,
impl<H> From<&HasherNode<H>> for TaggedBase64where
H: Digest,
Source§fn from(x: &HasherNode<H>) -> Self
fn from(x: &HasherNode<H>) -> Self
Converts to this type from the input type.
Source§impl<H> From<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
H: Digest,
Allow creation from [Output
]
impl<H> From<GenericArray<u8, <H as OutputSizeUser>::OutputSize>> for HasherNode<H>where
H: Digest,
Allow creation from [Output
]
Source§impl<H> From<HasherNode<H>> for TaggedBase64where
H: Digest,
impl<H> From<HasherNode<H>> for TaggedBase64where
H: Digest,
Source§fn from(x: HasherNode<H>) -> Self
fn from(x: HasherNode<H>) -> Self
Converts to this type from the input type.
Source§impl<H> FromStr for HasherNode<H>where
H: Digest,
impl<H> FromStr for HasherNode<H>where
H: Digest,
Source§impl<H> Hash for HasherNode<H>where
H: Digest,
impl<H> Hash for HasherNode<H>where
H: Digest,
Source§impl<H> Ord for HasherNode<H>where
H: Digest,
impl<H> Ord for HasherNode<H>where
H: Digest,
Source§impl<H> PartialEq for HasherNode<H>where
H: Digest,
impl<H> PartialEq for HasherNode<H>where
H: Digest,
Source§impl<H> PartialOrd for HasherNode<H>where
H: Digest,
impl<H> PartialOrd for HasherNode<H>where
H: Digest,
Source§impl<H> Serialize for HasherNode<H>where
H: Digest,
impl<H> Serialize for HasherNode<H>where
H: Digest,
Source§impl<H> TryFrom<&TaggedBase64> for HasherNode<H>where
H: Digest,
impl<H> TryFrom<&TaggedBase64> for HasherNode<H>where
H: Digest,
Source§impl<H> TryFrom<TaggedBase64> for HasherNode<H>where
H: Digest,
impl<H> TryFrom<TaggedBase64> for HasherNode<H>where
H: Digest,
Source§impl<H> Valid for HasherNode<H>where
H: Digest,
impl<H> Valid for HasherNode<H>where
H: Digest,
impl<H> Copy for HasherNode<H>
impl<H> Eq for HasherNode<H>where
H: Digest,
Auto Trait Implementations§
impl<H> Freeze for HasherNode<H>
impl<H> RefUnwindSafe for HasherNode<H>where
<<H as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<H> Send for HasherNode<H>
impl<H> Sync for HasherNode<H>
impl<H> Unpin for HasherNode<H>
impl<H> UnwindSafe for HasherNode<H>where
<<H as OutputSizeUser>::OutputSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more