pub struct HashAccumulator { /* private fields */ }
Expand description
Represents a 32-byte hash accumulator.
Implementations§
Source§impl HashAccumulator
impl HashAccumulator
pub fn new() -> HashAccumulator
Sourcepub fn concat(self, data: impl AsRef<[u8]>) -> HashAccumulator
pub fn concat(self, data: impl AsRef<[u8]>) -> HashAccumulator
Effectively concatenates data
to the payload-to-be-hashed
pub fn concat_mut(&mut self, data: impl AsRef<[u8]>)
pub fn input_length(&self) -> usize
pub fn finalize(self) -> Hash
Trait Implementations§
Source§impl Default for HashAccumulator
impl Default for HashAccumulator
Source§fn default() -> HashAccumulator
fn default() -> HashAccumulator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HashAccumulator
impl RefUnwindSafe for HashAccumulator
impl Send for HashAccumulator
impl Sync for HashAccumulator
impl Unpin for HashAccumulator
impl UnwindSafe for HashAccumulator
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