Struct tokio_core::channel::Sender
[−]
[src]
pub struct Sender<T> { /* fields omitted */ }
The transmission half of a channel used for sending messages to a receiver.
A Sender
can be clone
d to have multiple threads or instances sending
messages to one receiver.
This type is created by the channel
function.
Methods
impl<T> Sender<T>
[src]
fn send(&self, t: T) -> Result<()>
Sends a message to the corresponding receiver of this sender.
The message provided will be enqueued on the channel immediately, and this function will return immediately. Keep in mind that the underlying channel has infinite capacity, and this may not always be desired.
If an I/O error happens while sending the message, or if the receiver has gone away, then an error will be returned. Note that I/O errors here are generally quite abnormal.
Trait Implementations
impl<T> Clone for Sender<T>
[src]
fn clone(&self) -> Sender<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more