pub struct DigestHash { /* private fields */ }Expand description
A simple non-cryptographic hash digest for data fingerprinting.
Implementations§
Source§impl DigestHash
impl DigestHash
pub const SEED: u64 = 0xcbf2_9ce4_8422_2325
pub fn new() -> Self
pub fn from_bytes(data: &[u8]) -> Self
pub fn from_text(s: &str) -> Self
pub fn update(&mut self, data: &[u8])
pub fn update_u32(&mut self, val: u32)
pub fn update_f32(&mut self, val: f32)
pub fn finish(&self) -> u64
pub fn finish_u32(&self) -> u32
pub fn combine(&self, other: &DigestHash) -> DigestHash
pub fn is_zero(&self) -> bool
pub fn to_hex(&self) -> String
Trait Implementations§
Source§impl Clone for DigestHash
impl Clone for DigestHash
Source§fn clone(&self) -> DigestHash
fn clone(&self) -> DigestHash
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 DigestHash
impl Debug for DigestHash
Source§impl Default for DigestHash
impl Default for DigestHash
Source§impl Hash for DigestHash
impl Hash for DigestHash
Source§impl PartialEq for DigestHash
impl PartialEq for DigestHash
impl Copy for DigestHash
impl Eq for DigestHash
impl StructuralPartialEq for DigestHash
Auto Trait Implementations§
impl Freeze for DigestHash
impl RefUnwindSafe for DigestHash
impl Send for DigestHash
impl Sync for DigestHash
impl Unpin for DigestHash
impl UnsafeUnpin for DigestHash
impl UnwindSafe for DigestHash
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