pub enum HashTreeNode<Storage: AsRef<[u8]>> {
Empty(),
Fork(Box<(Self, Self)>),
Labeled(Label<Storage>, Box<Self>),
Leaf(Storage),
Pruned(Hash),
}
Expand description
A Node in the HashTree.
Variants§
Implementations§
Trait Implementations§
source§impl<Storage: AsRef<[u8]>> AsRef<HashTreeNode<Storage>> for HashTree<Storage>
impl<Storage: AsRef<[u8]>> AsRef<HashTreeNode<Storage>> for HashTree<Storage>
source§fn as_ref(&self) -> &HashTreeNode<Storage>
fn as_ref(&self) -> &HashTreeNode<Storage>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<Storage: Clone + AsRef<[u8]>> Clone for HashTreeNode<Storage>
impl<Storage: Clone + AsRef<[u8]>> Clone for HashTreeNode<Storage>
source§fn clone(&self) -> HashTreeNode<Storage>
fn clone(&self) -> HashTreeNode<Storage>
Returns a copy 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<'de> Deserialize<'de> for HashTreeNode<&'de [u8]>
impl<'de> Deserialize<'de> for HashTreeNode<&'de [u8]>
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<'de> Deserialize<'de> for HashTreeNode<Cow<'de, [u8]>>
impl<'de> Deserialize<'de> for HashTreeNode<Cow<'de, [u8]>>
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<'de> Deserialize<'de> for HashTreeNode<Vec<u8>>
impl<'de> Deserialize<'de> for HashTreeNode<Vec<u8>>
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<Storage: AsRef<[u8]>> From<HashTree<Storage>> for HashTreeNode<Storage>
impl<Storage: AsRef<[u8]>> From<HashTree<Storage>> for HashTreeNode<Storage>
source§fn from(tree: HashTree<Storage>) -> HashTreeNode<Storage>
fn from(tree: HashTree<Storage>) -> HashTreeNode<Storage>
Converts to this type from the input type.
source§impl<Storage: AsRef<[u8]>> Serialize for HashTreeNode<Storage>
impl<Storage: AsRef<[u8]>> Serialize for HashTreeNode<Storage>
source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<Storage: Eq + AsRef<[u8]>> Eq for HashTreeNode<Storage>
impl<Storage: AsRef<[u8]>> StructuralPartialEq for HashTreeNode<Storage>
Auto Trait Implementations§
impl<Storage> Freeze for HashTreeNode<Storage>where
Storage: Freeze,
impl<Storage> RefUnwindSafe for HashTreeNode<Storage>where
Storage: RefUnwindSafe,
impl<Storage> Send for HashTreeNode<Storage>where
Storage: Send,
impl<Storage> Sync for HashTreeNode<Storage>where
Storage: Sync,
impl<Storage> Unpin for HashTreeNode<Storage>where
Storage: Unpin,
impl<Storage> UnwindSafe for HashTreeNode<Storage>where
Storage: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)