kafka::producer

Type Alias DefaultHasher

Source
pub type DefaultHasher = XxHash32;
Expand description

The default hasher implementation used of DefaultPartitioner.

Aliased Type§

struct DefaultHasher { /* private fields */ }

Implementations

Source§

impl XxHash32

Source

pub fn with_seed(seed: u32) -> XxHash32

Constructs the hash with an initial seed

Source

pub fn seed(&self) -> u32

Source

pub fn total_len(&self) -> u32

Get the total number of bytes hashed, truncated to 32 bits. For the full 64-bit byte count, use total_len_64

Source

pub fn total_len_64(&self) -> u64

Get the total number of bytes hashed.

Trait Implementations

Source§

impl Clone for XxHash32

Source§

fn clone(&self) -> XxHash32

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for XxHash32

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for XxHash32

Source§

fn default() -> XxHash32

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

impl Hasher for XxHash32

Source§

fn finish(&self) -> u64

Returns the hash value for the values written so far. Read more
Source§

fn write(&mut self, bytes: &[u8])

Writes some data into this Hasher. Read more
1.3.0 · Source§

fn write_u8(&mut self, i: u8)

Writes a single u8 into this hasher.
1.3.0 · Source§

fn write_u16(&mut self, i: u16)

Writes a single u16 into this hasher.
1.3.0 · Source§

fn write_u32(&mut self, i: u32)

Writes a single u32 into this hasher.
1.3.0 · Source§

fn write_u64(&mut self, i: u64)

Writes a single u64 into this hasher.
1.26.0 · Source§

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)

Writes a single usize into this hasher.
1.3.0 · Source§

fn write_i8(&mut self, i: i8)

Writes a single i8 into this hasher.
1.3.0 · Source§

fn write_i16(&mut self, i: i16)

Writes a single i16 into this hasher.
1.3.0 · Source§

fn write_i32(&mut self, i: i32)

Writes a single i32 into this hasher.
1.3.0 · Source§

fn write_i64(&mut self, i: i64)

Writes a single i64 into this hasher.
1.26.0 · Source§

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)

Writes a single isize into this hasher.
Source§

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
Source§

fn write_str(&mut self, s: &str)

🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
Writes a single str into this hasher. Read more
Source§

impl PartialEq for XxHash32

Source§

fn eq(&self, other: &XxHash32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for XxHash32

Source§

impl StructuralPartialEq for XxHash32