pub enum Digest {
Blake3Digest32(Blake3Digest32),
}
Expand description
Hash digest
Variants§
Blake3Digest32(Blake3Digest32)
Implementations§
Source§impl Digest
impl Digest
pub fn from_slice(slice: [u8; 32]) -> Digest
pub fn slice(&self) -> &[u8; 32]
pub fn to_slice(self) -> [u8; 32]
Sourcepub fn get_hash(&self) -> u64
pub fn get_hash(&self) -> u64
returns a hash that is consistent across platforms (32/64 bits. important for WASM32 compatibility with the rest) see https://www.reddit.com/r/rust/comments/fwpki6/a_debugging_mystery_hashing_slices_in_wasm_works/
pub fn print_all(all: &[Digest]) -> String
pub fn print_iter(all: impl Iterator<Item = Digest>) -> String
pub fn print_iter_ref<'a>(all: impl Iterator<Item = &'a Digest>) -> String
pub fn print_all_ref(all: &[&Digest]) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Digest
impl<'de> Deserialize<'de> for 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 Ord for Digest
impl Ord for Digest
Source§impl PartialOrd for Digest
impl PartialOrd for Digest
impl Copy for Digest
impl Eq for Digest
impl StructuralPartialEq for Digest
Auto Trait Implementations§
impl Freeze for Digest
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnwindSafe for Digest
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