[][src]Struct async_oneshot::Sender

pub struct Sender<T> { /* fields omitted */ }

The sending half of a oneshot channel.

Implementations

impl<T> Sender<T>[src]

pub fn close(self)[src]

Closes the channel by causing an immediate drop

pub fn is_closed(&self) -> bool[src]

true if the channel is closed

pub fn wait(self) -> impl Future<Output = Result<Self, Closed>>[src]

Waits for a Receiver to be waiting for us to send something (i.e. allows you to produce a value to send on demand). Fails if the Receiver is dropped.

pub fn send(self, value: T) -> Result<(), Closed>[src]

Sends a message on the channel. Fails if the Receiver is dropped.

Trait Implementations

impl<T: Debug> Debug for Sender<T>[src]

impl<T> Drop for Sender<T>[src]

Auto Trait Implementations

impl<T> Send for Sender<T> where
    T: Send + Sync

impl<T> Sync for Sender<T> where
    T: Send + Sync

impl<T> Unpin for Sender<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.