pub struct HighwayHasher { /* private fields */ }
Expand description
HighwayHash
implementation that selects best hash implementation at runtime.
Implementations§
Source§impl HighwayHasher
impl HighwayHasher
Trait Implementations§
Source§impl Clone for HighwayHasher
impl Clone for HighwayHasher
Source§impl Debug for HighwayHasher
impl Debug for HighwayHasher
Source§impl Default for HighwayHasher
impl Default for HighwayHasher
Source§impl Hasher for HighwayHasher
impl Hasher for HighwayHasher
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 HighwayHash for HighwayHasher
impl HighwayHash for HighwayHasher
Source§fn append(&mut self, data: &[u8])
fn append(&mut self, data: &[u8])
Adds data to be hashed. If it is important, the performance characteristics of this
function differs depending on the amount of data previously hashed and the amount of
data to be hashed. For instance, if one appends 50, 1 byte slices then appending the 32nd
byte will have a performance outlier as the internal 32 byte block is complete and internally processed.
Source§fn finalize64(self) -> u64
fn finalize64(self) -> u64
Consumes the hasher to return the 64bit hash
Source§fn finalize128(self) -> [u64; 2]
fn finalize128(self) -> [u64; 2]
Consumes the hasher to return the 128bit hash
Source§fn finalize256(self) -> [u64; 4]
fn finalize256(self) -> [u64; 4]
Consumes the hasher to return the 256bit hash
Source§fn checkpoint(&self) -> [u8; 164]
fn checkpoint(&self) -> [u8; 164]
Serialize the hasher state to be persisted or resumed by another hasher Read more
Source§fn hash64(self, data: &[u8]) -> u64
fn hash64(self, data: &[u8]) -> u64
Convenience function for hashing all data in a single call and receiving a 64bit hash.
Results are equivalent to appending the data manually.
Source§impl Write for HighwayHasher
impl Write for HighwayHasher
Source§fn write(&mut self, bytes: &[u8]) -> Result<usize>
fn write(&mut self, bytes: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl Freeze for HighwayHasher
impl RefUnwindSafe for HighwayHasher
impl Send for HighwayHasher
impl Sync for HighwayHasher
impl Unpin for HighwayHasher
impl UnwindSafe for HighwayHasher
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