pub struct Sender<T> { /* private fields */ }
Expand description
Sender half of the forwarder
See the module-level documentation for more information.
Implementations§
Source§impl<T> Sender<T>
impl<T> Sender<T>
Sourcepub fn send(self, value: T) -> Result<(), T>
pub fn send(self, value: T) -> Result<(), T>
Sends a value to the receiver.
The value is sent to the receiver. If the receiver has been dropped, the value is returned back to the caller.
This method consumes the sender, ensuring that the value is sent at most once for each sender-receiver pair.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze 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> !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