pub struct MessageListenerHandle { /* private fields */ }Expand description
Owns the background poller task driving a push-mode consumer. Mirrors the
lifetime semantics of crate::TableView’s drain task: dropping the handle
aborts the poller; Self::close awaits a clean stop.
The poller terminates on its own when an explicit or terminal remote close
makes receive() return an error. Dropping this handle aborts the poller,
then task unwinding drops its owned consumer clone. That clone triggers a
best-effort close only when it is the final clone; if other consumer clones
remain, this drop stages no close.
Implementations§
Source§impl MessageListenerHandle
impl MessageListenerHandle
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
true while the poller task is still running. Flips to false once the
consumer is closed (the loop broke) or the handle has been
Self::closed / dropped.
Trait Implementations§
Source§impl Debug for MessageListenerHandle
impl Debug for MessageListenerHandle
Source§impl Drop for MessageListenerHandle
impl Drop for MessageListenerHandle
Auto Trait Implementations§
impl !Freeze for MessageListenerHandle
impl !RefUnwindSafe for MessageListenerHandle
impl Send for MessageListenerHandle
impl Sync for MessageListenerHandle
impl Unpin for MessageListenerHandle
impl UnsafeUnpin for MessageListenerHandle
impl UnwindSafe for MessageListenerHandle
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