pub struct BlockHasher { /* private fields */ }Expand description
Incremental hasher for a single block, this can only be used to hash only one block.
Implementations§
Source§impl BlockHasher
impl BlockHasher
pub fn update(&mut self, input: &[u8])
pub fn update_rayon(&mut self, input: &[u8])
pub fn update_with_join<J: Join>(&mut self, input: &[u8])
Sourcepub fn set_block(&mut self, block: usize)
pub fn set_block(&mut self, block: usize)
Set the index of the block which we’re hashing with this BlockHasher.
§Panics
This function can only be called right after instantiating a BlockHasher,
this will panic if it gets called after any bytes were consume by the hasher.
Trait Implementations§
Source§impl Clone for BlockHasher
impl Clone for BlockHasher
Source§fn clone(&self) -> BlockHasher
fn clone(&self) -> BlockHasher
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 moreAuto Trait Implementations§
impl Freeze for BlockHasher
impl RefUnwindSafe for BlockHasher
impl Send for BlockHasher
impl Sync for BlockHasher
impl Unpin for BlockHasher
impl UnwindSafe for BlockHasher
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more