pub struct StreamListener<D> { /* private fields */ }Expand description
An owned listener for stream events.
This is created by stream::ListenerLocalBuilder and will receive events as long as it is alive.
When this gets dropped, the listener gets unregistered and no events will be received by it.
Implementations§
Source§impl<D> StreamListener<D>
impl<D> StreamListener<D>
Sourcepub fn unregister(self)
pub fn unregister(self)
Stop the listener from receiving any events
Removes the listener registration and cleans up allocated resources.
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for StreamListener<D>
impl<D> !RefUnwindSafe for StreamListener<D>
impl<D> !Send for StreamListener<D>
impl<D> !Sync for StreamListener<D>
impl<D> Unpin for StreamListener<D>
impl<D> !UnwindSafe for StreamListener<D>
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