pub struct Sender<T> { /* private fields */ }Expand description
Producer side. Only one sender is supported per channel today; the API matches tokio’s single-producer semantics.
Implementations§
Source§impl<T> Sender<T>
impl<T> Sender<T>
Sourcepub fn send(&self, value: T) -> Result<(), SendError<T>>
pub fn send(&self, value: T) -> Result<(), SendError<T>>
Replace the current value, bumping the version and waking
every receiver parked in changed(). Returns the value back
via SendError if every receiver has been dropped.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Sender<T>
impl<T> RefUnwindSafe for Sender<T>where
Arc<Inner<T>>: RefUnwindSafe,
impl<T> Send for Sender<T>
impl<T> Sync for Sender<T>
impl<T> Unpin for Sender<T>
impl<T> UnsafeUnpin for Sender<T>where
Arc<Inner<T>>: UnsafeUnpin,
impl<T> UnwindSafe for Sender<T>where
Arc<Inner<T>>: UnwindSafe,
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