[−][src]Struct suspend::Sender
A oneshot::Sender
used to provide a single asynchronous result.
Requires the oneshot
feature.
Implementations
impl<T> Sender<T>
[src]
A oneshot::Sender
used to provide a single asynchronous result.
Requires the oneshot
feature.
pub fn send(self, message: T) -> Result<(), SendError<T>>
[src]
Sends message
over the channel to the corresponding Receiver
.
Returns an error if the receiver has already been dropped. The message can be extracted from the error.
This method is completely lock-free and wait-free when sending on a channel that the
receiver is currently not receiving on. If the receiver is receiving during the send
operation this method includes waking up the thread/task. Unparking a thread currently
involves a mutex in Rust's standard library. How lock-free waking up an async task is
depends on your executor. If this method returns a SendError
, please mind that dropping
the error involves running any drop implementation on the message type, which might or
might not be lock-free.
Trait Implementations
impl<T> Debug for Sender<T> where
T: Debug,
[src]
T: Debug,
impl<T> Drop for Sender<T>
[src]
impl<T> Send for Sender<T> where
T: Send,
[src]
T: Send,
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>
impl<T> !Sync for Sender<T>
impl<T> Unpin for Sender<T>
impl<T> !UnwindSafe for Sender<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,