pub struct Sender<T>(/* private fields */);Expand description
The producer half. Never blocks, never waits.
Implementations§
Source§impl<T> Sender<T>
impl<T> Sender<T>
Sourcepub fn send(&self, value: T) -> Result<(), Closed>
pub fn send(&self, value: T) -> Result<(), Closed>
Queue a value.
Err only when the receiver is gone — which is how a producer knows to
stop, and why the backends can drop a subscription by testing this. A
full queue is not an error: something is dropped, counted, and the send
still succeeds, because the alternative is telling a platform callback
about a problem it cannot do anything about.
Trait Implementations§
Auto Trait Implementations§
impl<T> Forget for Sender<T>
impl<T> Freeze for Sender<T>
impl<T> Move for Sender<T>
impl<T> RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T>
impl<T> Sync for Sender<T>
impl<T> Unpin for Sender<T>
impl<T> UnsafeUnpin for Sender<T>
impl<T> UnwindSafe for Sender<T>
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