Trait transformable_channels::mpsc::ExtSender [] [src]

pub trait ExtSender<T>: Send + 'static where T: Send + 'static {
    fn send(&self, t: T) -> Result<(), ()>;
    fn internal_clone(&self) -> Box<ExtSender<T>>;
}

The sending-half of this crate's asynchronous channel type. This half can only be owned by one thread, but all instances can be cloned to let copies be shared with other threads.

All implementations of ExtSender provided in this crate implement TransformableSender, which provides

Required Methods

fn send(&self, t: T) -> Result<(), ()>

Attempts to send a value on this channel.

A successful send occurs when it is determined that the other end of the channel has not hung up already. An unsuccessful send would be one where the corresponding receiver has already been deallocated. Note that a return value of Err means that the data will never be received, but a return value of Ok does not mean that the data will be received. It is possible for the corresponding receiver to hang up immediately after this function returns Ok.

This method will never block the current thread.

fn internal_clone(&self) -> Box<ExtSender<T>>

A low-level method used to define Clone(). Probably not useful outside of this crate. May disappear in future versions.

Implementors