pub struct CryptoStableHasher { /* private fields */ }Expand description
Based on https://crypto.stackexchange.com/a/54546
The idea here is to use the FieldAddress to unambiguously identify each field as within it’s own database cell, and use an online order-independent aggregator of the cells to produce a final result.
Within this framework a huge struct can be hashed incrementally or even in parallel as long as field addresses are deterministically produced to uniquely identify parts within the struct. Conveniently, the FieldAddress::skip method can be used to jump to parts of a vec or struct efficiently.
Trait Implementations§
Source§impl Clone for CryptoStableHasher
impl Clone for CryptoStableHasher
Source§fn clone(&self) -> CryptoStableHasher
fn clone(&self) -> CryptoStableHasher
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 CryptoStableHasher
impl Debug for CryptoStableHasher
Source§impl Default for CryptoStableHasher
impl Default for CryptoStableHasher
Source§impl PartialEq for CryptoStableHasher
impl PartialEq for CryptoStableHasher
Source§impl StableHasher for CryptoStableHasher
impl StableHasher for CryptoStableHasher
Source§fn from_bytes(bytes: Vec<u8>) -> Self
fn from_bytes(bytes: Vec<u8>) -> Self
Panics if the bytes are not in a valid format. The only valid values are values returned from to_bytes()
impl Eq for CryptoStableHasher
impl StructuralPartialEq for CryptoStableHasher
Auto Trait Implementations§
impl Freeze for CryptoStableHasher
impl RefUnwindSafe for CryptoStableHasher
impl Send for CryptoStableHasher
impl Sync for CryptoStableHasher
impl Unpin for CryptoStableHasher
impl UnwindSafe for CryptoStableHasher
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