pub struct NoCustomPartitioner {}
Expand description
Placeholder used when no custom partitioner is needed.
Trait Implementations§
Source§impl Clone for NoCustomPartitioner
impl Clone for NoCustomPartitioner
Source§fn clone(&self) -> NoCustomPartitioner
fn clone(&self) -> NoCustomPartitioner
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Partitioner for NoCustomPartitioner
impl Partitioner for NoCustomPartitioner
Source§fn partition(
&self,
_topic_name: &str,
_key: Option<&[u8]>,
_partition_cnt: i32,
_is_paritition_available: impl Fn(i32) -> bool,
) -> i32
fn partition( &self, _topic_name: &str, _key: Option<&[u8]>, _partition_cnt: i32, _is_paritition_available: impl Fn(i32) -> bool, ) -> i32
Return partition to use for
topic_name
.
topic_name
is the name of a topic to which a message is being produced.
partition_cnt
is the number of partitions for this topic.
key
is an optional key of the message.
is_partition_available
is a function that can be called to check if a partition has an active leader broker. Read moreAuto Trait Implementations§
impl Freeze for NoCustomPartitioner
impl RefUnwindSafe for NoCustomPartitioner
impl Send for NoCustomPartitioner
impl Sync for NoCustomPartitioner
impl Unpin for NoCustomPartitioner
impl UnwindSafe for NoCustomPartitioner
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