pub struct ConsumerRebalanceListener { /* private fields */ }Expand description
Synchronous callback invoked when a group consumer assignment changes.
Implementations§
Source§impl ConsumerRebalanceListener
impl ConsumerRebalanceListener
Sourcepub fn new(
callback: impl Fn(ConsumerRebalanceEvent) + Send + Sync + 'static,
) -> Self
pub fn new( callback: impl Fn(ConsumerRebalanceEvent) + Send + Sync + 'static, ) -> Self
Creates a new rebalance listener.
Sourcepub fn on_rebalance(&self, event: ConsumerRebalanceEvent)
pub fn on_rebalance(&self, event: ConsumerRebalanceEvent)
Invokes the callback.
Trait Implementations§
Source§impl Clone for ConsumerRebalanceListener
impl Clone for ConsumerRebalanceListener
Source§fn clone(&self) -> ConsumerRebalanceListener
fn clone(&self) -> ConsumerRebalanceListener
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ConsumerRebalanceListener
impl !RefUnwindSafe for ConsumerRebalanceListener
impl Send for ConsumerRebalanceListener
impl Sync for ConsumerRebalanceListener
impl Unpin for ConsumerRebalanceListener
impl UnsafeUnpin for ConsumerRebalanceListener
impl !UnwindSafe for ConsumerRebalanceListener
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