[][src]Struct flume::Sender

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

A transmitting end of a channel.

Methods

impl<T> Sender<T>[src]

pub fn send(&self, msg: T) -> Result<(), SendError<T>>[src]

Send a value into the channel, returning an error if the channel receiver has been dropped. If the channel is bounded and is full, this method will block.

pub fn try_send(&self, msg: T) -> Result<(), TrySendError<T>>[src]

Attempt to send a value into the channel. If the channel is bounded and full, or the receiver has been dropped, an error is returned. If the channel associated with this sender is unbounded, this method has the same behaviour as Sender::send.

Trait Implementations

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

fn clone(&self) -> Self[src]

Clone this sender. Sender acts as a handle to a channel, and the channel will only be cleaned up when all senders and the receiver have been dropped.

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

Auto Trait Implementations

impl<T> !RefUnwindSafe for Sender<T>

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

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

impl<T> Unpin for Sender<T>

impl<T> !UnwindSafe 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.