pub struct HashSecret { /* private fields */ }Implementations§
Source§impl HashSecret
impl HashSecret
pub fn new(seed: u32) -> Self
Sourcepub const fn from_keys(k0: u64, k1: u64) -> Self
pub const fn from_keys(k0: u64, k1: u64) -> Self
Build a secret from explicit SipHash keys, bypassing seed derivation.
Lets an embedder reproduce a fixed keying (e.g. a deterministic run) that
new cannot express through its u32 seed.
pub fn hash_value<T: Hash + ?Sized>(&self, data: &T) -> PyHash
pub fn hash_iter<'a, T: 'a, I, F, E>( &self, iter: I, hash_func: F, ) -> Result<PyHash, E>
pub fn hash_bytes(&self, value: &[u8]) -> PyHash
pub fn hash_str(&self, value: &str) -> PyHash
Trait Implementations§
Source§impl BuildHasher for HashSecret
impl BuildHasher for HashSecret
Source§impl Clone for HashSecret
impl Clone for HashSecret
impl Copy for HashSecret
Auto Trait Implementations§
impl Freeze for HashSecret
impl RefUnwindSafe for HashSecret
impl Send for HashSecret
impl Sync for HashSecret
impl Unpin for HashSecret
impl UnsafeUnpin for HashSecret
impl UnwindSafe for HashSecret
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
fn imaginary_into(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more