#[repr(transparent)]pub struct Blake3Node([u8; 32]);Expand description
32-byte BLAKE3 hash, suitable as a jf_merkle_tree NodeValue.
Tuple Fields§
§0: [u8; 32]Implementations§
Trait Implementations§
Source§impl AsRef<[u8]> for Blake3Node
impl AsRef<[u8]> for Blake3Node
Source§impl CanonicalDeserialize for Blake3Node
impl CanonicalDeserialize for Blake3Node
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 CanonicalSerialize for Blake3Node
impl CanonicalSerialize for Blake3Node
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 Clone for Blake3Node
impl Clone for Blake3Node
Source§fn clone(&self) -> Blake3Node
fn clone(&self) -> Blake3Node
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Blake3Node
impl Debug for Blake3Node
Source§impl Default for Blake3Node
impl Default for Blake3Node
Source§fn default() -> Blake3Node
fn default() -> Blake3Node
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Blake3Node
impl<'de> Deserialize<'de> for Blake3Node
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> DigestAlgorithm<E, I, Blake3Node> for Blake3DigestAlgorithmwhere
E: Element + CanonicalSerialize,
I: Index + CanonicalSerialize,
impl<E, I> DigestAlgorithm<E, I, Blake3Node> for Blake3DigestAlgorithmwhere
E: Element + CanonicalSerialize,
I: Index + CanonicalSerialize,
Source§fn digest(data: &[Blake3Node]) -> Result<Blake3Node, MerkleTreeError>
fn digest(data: &[Blake3Node]) -> Result<Blake3Node, MerkleTreeError>
Digest a list of values
Source§fn digest_leaf(pos: &I, elem: &E) -> Result<Blake3Node, MerkleTreeError>
fn digest_leaf(pos: &I, elem: &E) -> Result<Blake3Node, MerkleTreeError>
Digest an indexed element
Source§impl Display for Blake3Node
impl Display for Blake3Node
Source§impl From<&Blake3Node> for TaggedBase64
impl From<&Blake3Node> for TaggedBase64
Source§fn from(x: &Blake3Node) -> Self
fn from(x: &Blake3Node) -> Self
Converts to this type from the input type.
Source§impl From<Blake3Node> for TaggedBase64
impl From<Blake3Node> for TaggedBase64
Source§fn from(x: Blake3Node) -> Self
fn from(x: Blake3Node) -> Self
Converts to this type from the input type.
Source§impl From<Hash> for Blake3Node
impl From<Hash> for Blake3Node
Source§impl FromStr for Blake3Node
impl FromStr for Blake3Node
Source§impl Hash for Blake3Node
impl Hash for Blake3Node
Source§impl Ord for Blake3Node
impl Ord for Blake3Node
Source§fn cmp(&self, other: &Blake3Node) -> Ordering
fn cmp(&self, other: &Blake3Node) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Blake3Node
impl PartialEq for Blake3Node
Source§impl PartialOrd for Blake3Node
impl PartialOrd for Blake3Node
Source§impl Serialize for Blake3Node
impl Serialize for Blake3Node
Source§impl TryFrom<&TaggedBase64> for Blake3Node
impl TryFrom<&TaggedBase64> for Blake3Node
Source§impl TryFrom<TaggedBase64> for Blake3Node
impl TryFrom<TaggedBase64> for Blake3Node
Source§impl Valid for Blake3Node
impl Valid for Blake3Node
impl Copy for Blake3Node
impl Eq for Blake3Node
impl StructuralPartialEq for Blake3Node
Auto Trait Implementations§
impl Freeze for Blake3Node
impl RefUnwindSafe for Blake3Node
impl Send for Blake3Node
impl Sync for Blake3Node
impl Unpin for Blake3Node
impl UnsafeUnpin for Blake3Node
impl UnwindSafe for Blake3Node
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
Compare self to
key and return true if they are equal.§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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)