pub struct PartitionKey(pub Vec<u8>);Expand description
An arbitrary key used to route a message to a partition, the way a Kafka producer key does.
Later hashes this key to pick a partition (see partition_for_key), so
the same key always lands on the same partition for a given topic’s
partition count, and the caller never chooses a partition number
directly.
Tuple Fields§
§0: Vec<u8>Trait Implementations§
Source§impl Clone for PartitionKey
impl Clone for PartitionKey
Source§fn clone(&self) -> PartitionKey
fn clone(&self) -> PartitionKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartitionKey
impl Debug for PartitionKey
impl Eq for PartitionKey
Source§impl From<&[u8]> for PartitionKey
impl From<&[u8]> for PartitionKey
Source§impl From<&str> for PartitionKey
impl From<&str> for PartitionKey
Source§impl From<String> for PartitionKey
impl From<String> for PartitionKey
Source§impl From<i8> for PartitionKey
impl From<i8> for PartitionKey
Source§impl From<i16> for PartitionKey
impl From<i16> for PartitionKey
Source§impl From<i32> for PartitionKey
impl From<i32> for PartitionKey
Source§impl From<i64> for PartitionKey
impl From<i64> for PartitionKey
Source§impl From<i128> for PartitionKey
impl From<i128> for PartitionKey
Source§impl From<u8> for PartitionKey
impl From<u8> for PartitionKey
Source§impl From<u16> for PartitionKey
impl From<u16> for PartitionKey
Source§impl From<u32> for PartitionKey
impl From<u32> for PartitionKey
Source§impl From<u64> for PartitionKey
impl From<u64> for PartitionKey
Source§impl From<u128> for PartitionKey
impl From<u128> for PartitionKey
Source§impl Hash for PartitionKey
impl Hash for PartitionKey
Source§impl PartialEq for PartitionKey
impl PartialEq for PartitionKey
impl StructuralPartialEq for PartitionKey
Auto Trait Implementations§
impl Freeze for PartitionKey
impl RefUnwindSafe for PartitionKey
impl Send for PartitionKey
impl Sync for PartitionKey
impl Unpin for PartitionKey
impl UnsafeUnpin for PartitionKey
impl UnwindSafe for PartitionKey
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