Struct bchannel::Sender [] [src]

pub struct Sender<T: Send, E: Send> { /* fields omitted */ }

The sending end of the channel.

Methods

impl<T, E> Sender<T, E> where
    T: Send + 'static,
    E: Send + 'static, 
[src]

Converts an old-stype Sender to a bchannel Sender.

Returns the old-style Sender that is containd inside this Sender.

Sends a message through the channel. Returns Ok(()) if the sending might succeed, and returns an Err with the message that you tried to send in the event that the sending surely failed.

Tries to send all of the messages in an iterator. Returns Ok(()) if the sending might succeed and returns Err with a tuple containing the message that failed to send, and the remaining iterator.

Closes the sending end of the channel.

Closes the sending end of the channel with an error.

Returns true if any message has failed to send.

Trait Implementations

impl<T, E> Clone for Sender<T, E> where
    T: Send + 'static,
    E: Send + 'static, 
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Send, E: Send> Send for Sender<T, E>
[src]