pub struct CityHash128Hasher { /* private fields */ }
Expand description

128-bits CityHash hasher

Implementations

Create a new CityHash128Hasher initiated with a hash key

Trait Implementations

Creates a new CityHash128Hasher.

Type of the hasher that will be created.

🔬 This is a nightly-only experimental API. (build_hasher_simple_hash_one)

Calculates the hash of a single value. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the hash value for the values written so far. The hash is compress to a 64-bits with city_hash_128_to_64

Example
use cityhash_sys::CityHash128Hasher;
use core::hash::Hasher;

let hasher = CityHash128Hasher::with_seed(0xAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB);
assert_eq!(hasher.finish(), 0x88FC029FFEBB98B4);

Writes some data into the CityHash128Hasher.

Example
use cityhash_sys::CityHash128Hasher;
use core::hash::Hasher;

let mut hasher = CityHash128Hasher::default();
hasher.write(b"hash me!");

Writes a single u8 into this hasher.

Writes a single u16 into this hasher.

Writes a single u32 into this hasher.

Writes a single u64 into this hasher.

Writes a single u128 into this hasher.

Writes a single usize into this hasher.

Writes a single i8 into this hasher.

Writes a single i16 into this hasher.

Writes a single i32 into this hasher.

Writes a single i64 into this hasher.

Writes a single i128 into this hasher.

Writes a single isize into this hasher.

🔬 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

🔬 This is a nightly-only experimental API. (hasher_prefixfree_extras)

Writes a single str into this hasher. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.