pub struct GenericHasher<H: Default + HashAlgorithm, const OUTPUT_LEN: usize> {
pub padding: H::Padding,
pub state: H,
}
Fields§
§padding: H::Padding
§state: H
Trait Implementations§
Source§impl<H: Clone + Default + HashAlgorithm, const OUTPUT_LEN: usize> Clone for GenericHasher<H, OUTPUT_LEN>
impl<H: Clone + Default + HashAlgorithm, const OUTPUT_LEN: usize> Clone for GenericHasher<H, OUTPUT_LEN>
Source§fn clone(&self) -> GenericHasher<H, OUTPUT_LEN>
fn clone(&self) -> GenericHasher<H, OUTPUT_LEN>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<H: Debug + Default + HashAlgorithm, const OUTPUT_LEN: usize> Debug for GenericHasher<H, OUTPUT_LEN>
impl<H: Debug + Default + HashAlgorithm, const OUTPUT_LEN: usize> Debug for GenericHasher<H, OUTPUT_LEN>
Source§impl<H: Default + Default + HashAlgorithm, const OUTPUT_LEN: usize> Default for GenericHasher<H, OUTPUT_LEN>
impl<H: Default + Default + HashAlgorithm, const OUTPUT_LEN: usize> Default for GenericHasher<H, OUTPUT_LEN>
Source§fn default() -> GenericHasher<H, OUTPUT_LEN>
fn default() -> GenericHasher<H, OUTPUT_LEN>
Returns the “default value” for a type. Read more
Source§impl<H: Hash + Default + HashAlgorithm, const OUTPUT_LEN: usize> Hash for GenericHasher<H, OUTPUT_LEN>
impl<H: Hash + Default + HashAlgorithm, const OUTPUT_LEN: usize> Hash for GenericHasher<H, OUTPUT_LEN>
Source§impl<H: Default + HashAlgorithm, const OUTPUT_LEN: usize> Hasher for GenericHasher<H, OUTPUT_LEN>where
ByteArrayWrapper<OUTPUT_LEN>: From<H>,
impl<H: Default + HashAlgorithm, const OUTPUT_LEN: usize> Hasher for GenericHasher<H, OUTPUT_LEN>where
ByteArrayWrapper<OUTPUT_LEN>: From<H>,
1.26.0 · Source§fn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
Writes a single
u128
into this hasher.1.3.0 · Source§fn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
Writes a single
usize
into this hasher.1.26.0 · Source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
Writes a single
i128
into this hasher.1.3.0 · Source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
Writes a single
isize
into this hasher.Source§fn write_length_prefix(&mut self, len: usize)
fn write_length_prefix(&mut self, len: usize)
🔬This is a nightly-only experimental API. (
hasher_prefixfree_extras
)Writes a length prefix into this hasher, as part of being prefix-free. Read more
Source§impl<H: Default + HashAlgorithm, const OUTPUT_LEN: usize> HasherContext<OUTPUT_LEN> for GenericHasher<H, OUTPUT_LEN>where
ByteArrayWrapper<OUTPUT_LEN>: From<H>,
impl<H: Default + HashAlgorithm, const OUTPUT_LEN: usize> HasherContext<OUTPUT_LEN> for GenericHasher<H, OUTPUT_LEN>where
ByteArrayWrapper<OUTPUT_LEN>: From<H>,
Source§impl<H: PartialEq + Default + HashAlgorithm, const OUTPUT_LEN: usize> PartialEq for GenericHasher<H, OUTPUT_LEN>
impl<H: PartialEq + Default + HashAlgorithm, const OUTPUT_LEN: usize> PartialEq for GenericHasher<H, OUTPUT_LEN>
Source§fn eq(&self, other: &GenericHasher<H, OUTPUT_LEN>) -> bool
fn eq(&self, other: &GenericHasher<H, OUTPUT_LEN>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<H: Eq + Default + HashAlgorithm, const OUTPUT_LEN: usize> Eq for GenericHasher<H, OUTPUT_LEN>
impl<H: Default + HashAlgorithm, const OUTPUT_LEN: usize> StructuralPartialEq for GenericHasher<H, OUTPUT_LEN>
Auto Trait Implementations§
impl<H, const OUTPUT_LEN: usize> Freeze for GenericHasher<H, OUTPUT_LEN>
impl<H, const OUTPUT_LEN: usize> RefUnwindSafe for GenericHasher<H, OUTPUT_LEN>
impl<H, const OUTPUT_LEN: usize> Send for GenericHasher<H, OUTPUT_LEN>
impl<H, const OUTPUT_LEN: usize> Sync for GenericHasher<H, OUTPUT_LEN>
impl<H, const OUTPUT_LEN: usize> Unpin for GenericHasher<H, OUTPUT_LEN>
impl<H, const OUTPUT_LEN: usize> UnwindSafe for GenericHasher<H, OUTPUT_LEN>
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