Trait merkletree::merkle::Element
source · pub trait Element: Ord + Clone + AsRef<[u8]> + Sync + Send + Default + Debug {
// Required methods
fn byte_len() -> usize;
fn from_slice(bytes: &[u8]) -> Self;
fn copy_to_slice(&self, bytes: &mut [u8]);
}
Expand description
Element stored in the merkle tree.
Required Methods§
sourcefn from_slice(bytes: &[u8]) -> Self
fn from_slice(bytes: &[u8]) -> Self
Creates the element from its byte form. Panics if the slice is not appropriately sized.
fn copy_to_slice(&self, bytes: &mut [u8])
Object Safety§
This trait is not object safe.