pub struct StableHasher(/* private fields */);
Expand description
A non-cryptographic hash implementation that is meant to be stable over time.
The implementation is intended to be stable over time and across different runs of the applications, such that it can be depended on across different builds/versions of Saluki.
At a minimum, the hasher implementation will not change within major versions of Saluki, including v0 and v1.
Currently, sha3
(specifically SHAKE128) is used as the underlying implementation. While SHAKE128 is a
cryptographic hash algorithm, the way it is used effectively makes it a non-cryptographic hash algorithm given how
much the output is truncated.
Trait Implementations§
Source§impl Default for StableHasher
impl Default for StableHasher
Source§fn default() -> StableHasher
fn default() -> StableHasher
Returns the “default value” for a type. Read more
Source§impl Hasher for StableHasher
impl Hasher for StableHasher
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
Auto Trait Implementations§
impl Freeze for StableHasher
impl RefUnwindSafe for StableHasher
impl Send for StableHasher
impl Sync for StableHasher
impl Unpin for StableHasher
impl UnwindSafe for StableHasher
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked
wrapper. Read more