pub struct Subscriber { /* private fields */ }
Expand description
Transport subscriber
Methods from Deref<Target = ReceiverStream<Message>>§
sourcepub fn close(&mut self)
pub fn close(&mut self)
Closes the receiving half of a channel without dropping it.
This prevents any further messages from being sent on the channel while
still enabling the receiver to drain messages that are buffered. Any
outstanding Permit
values will still be able to send messages.
To guarantee no messages are dropped, after calling close()
, you must
receive all items from the stream until None
is returned.
Trait Implementations§
source§impl Deref for Subscriber
impl Deref for Subscriber
source§impl DerefMut for Subscriber
impl DerefMut for Subscriber
Auto Trait Implementations§
impl !Freeze for Subscriber
impl !RefUnwindSafe for Subscriber
impl Send for Subscriber
impl Sync for Subscriber
impl Unpin for Subscriber
impl !UnwindSafe for Subscriber
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