pub struct ContentHash(/* private fields */);Expand description
xxh3-128 content key. The digest gates key EQUALITY for dedup grouping and must never be persisted or written into an output: the algorithm may change.
Implementations§
Source§impl ContentHash
impl ContentHash
pub fn new() -> Self
pub fn write(&mut self, bytes: &[u8]) -> &mut Self
pub fn write_u64(&mut self, v: u64) -> &mut Self
Sourcepub fn write_f32s(&mut self, data: &[f32]) -> &mut Self
pub fn write_f32s(&mut self, data: &[f32]) -> &mut Self
A u64 little-endian length frame, then the raw bit patterns of data
(so concatenated runs cannot alias).
Sourcepub fn write_u32s(&mut self, data: &[u32]) -> &mut Self
pub fn write_u32s(&mut self, data: &[u32]) -> &mut Self
As ContentHash::write_f32s for u32 runs.
pub fn finish(&self) -> u128
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContentHash
impl RefUnwindSafe for ContentHash
impl Send for ContentHash
impl Sync for ContentHash
impl Unpin for ContentHash
impl UnwindSafe for ContentHash
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