pub struct Sender<'a, T, N: ArrayLength<Option<T>>> { /* private fields */ }Expand description
The endpoint of a channel for sending values.
Implementations§
Source§impl<'a, T: Unpin, N: ArrayLength<Option<T>>> Sender<'a, T, N>
impl<'a, T: Unpin, N: ArrayLength<Option<T>>> Sender<'a, T, N>
Sourcepub fn send(&mut self, value: T) -> impl Future<Output = Result<(), T>> + '_
pub fn send(&mut self, value: T) -> impl Future<Output = Result<(), T>> + '_
Asynchronously send a value through the channel.
If the channel is already at full capacity, this will wait until the
Receiver consumes a value, and then notify that the channel is ready.
If the receiver endpoint has been dropped, this returns Err(value),
regardless of whether there is enough capacity.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T, N> Freeze for Sender<'a, T, N>
impl<'a, T, N> RefUnwindSafe for Sender<'a, T, N>
impl<'a, T, N> Send for Sender<'a, T, N>where
T: Send,
impl<'a, T, N> Sync for Sender<'a, T, N>where
T: Sync,
impl<'a, T, N> Unpin for Sender<'a, T, N>
impl<'a, T, N> !UnwindSafe for Sender<'a, T, N>
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