Struct rustpython_common::hash::HashSecret
source · pub struct HashSecret { /* private fields */ }
Implementations§
source§impl HashSecret
impl HashSecret
pub fn hash_value<T: Hash + ?Sized>(&self, data: &T) -> PyHash
pub fn hash_iter<'a, T: 'a, I, F, E>(
&self,
iter: I,
hashf: F
) -> Result<PyHash, E>where
I: IntoIterator<Item = &'a T>,
F: Fn(&'a T) -> 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
§type Hasher = SipHasher24
type Hasher = SipHasher24
Type of the hasher that will be created.
source§fn build_hasher(&self) -> Self::Hasher
fn build_hasher(&self) -> Self::Hasher
Creates a new hasher. Read more
source§impl Distribution<HashSecret> for Standard
impl Distribution<HashSecret> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> HashSecret
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> HashSecret
Generate a random value of
T
, using rng
as the source of randomness.