pub struct RoundRobinPartitioner { /* private fields */ }Expand description
The “Round-Robin” partitioner.
This partitioning strategy can be used when user wants to distribute the writes to all partitions equally. This is the behaviour regardless of record key hash.
Implementations§
Trait Implementations§
Source§impl Debug for RoundRobinPartitioner
impl Debug for RoundRobinPartitioner
Source§impl Default for RoundRobinPartitioner
impl Default for RoundRobinPartitioner
Source§fn default() -> RoundRobinPartitioner
fn default() -> RoundRobinPartitioner
Returns the “default value” for a type. Read more
Source§impl<K, V> Partitioner<K, V> for RoundRobinPartitioner
impl<K, V> Partitioner<K, V> for RoundRobinPartitioner
Source§fn partition(
&self,
topic: &str,
_key: Option<&K>,
_key_bytes: Option<&[u8]>,
_value: Option<&V>,
_value_bytes: Option<&[u8]>,
cluster: &Cluster,
) -> i32
fn partition( &self, topic: &str, _key: Option<&K>, _key_bytes: Option<&[u8]>, _value: Option<&V>, _value_bytes: Option<&[u8]>, cluster: &Cluster, ) -> i32
Compute the partition for the given record. Read more
Auto Trait Implementations§
impl Freeze for RoundRobinPartitioner
impl !RefUnwindSafe for RoundRobinPartitioner
impl Send for RoundRobinPartitioner
impl Sync for RoundRobinPartitioner
impl Unpin for RoundRobinPartitioner
impl UnsafeUnpin for RoundRobinPartitioner
impl UnwindSafe for RoundRobinPartitioner
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