Struct eventual::Sender
[−]
[src]
pub struct Sender<T: Send + 'static, E: Send + 'static> { // some fields omitted }
The sending half of Stream::pair()
. Can only be owned by a single task at
a time.
Methods
impl<T: Send + 'static, E: Send + 'static> Sender<T, E>
fn send(self, val: T) -> BusySender<T, E>
Attempts to send a value to its Stream
. Consumes self and returns a
future representing the operation completing successfully and interest
in the next value being expressed.
fn fail(self, err: E)
Terminated the stream with the given error.
fn abort(self)
Fails the paired Stream
with a cancellation error. This will
eventually go away when carllerche/syncbox#10 lands. It is currently
needed to keep the state correct (see async::sequence)
fn send_all<S: Source<Value=T>>(self, src: S) -> Future<Self, (S::Error, Self)>
Send + 'static all the values in the given source