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

Trait Implementations

impl<T: Send + 'static, E: Send + 'static> Async for Sender<T, E>

type Value = Sender<T, E>

type Error = ()

type Cancel = Receipt<Sender<T, E>>

fn is_ready(&self) -> bool

fn is_err(&self) -> bool

fn poll(self) -> Result<AsyncResult<Sender<T, E>, ()>, Sender<T, E>>

fn ready<F: FnOnce(Sender<T, E>) + Send + 'static>(self, f: F) -> Receipt<Sender<T, E>>

fn expect(self) -> AsyncResult<Self::Value, Self::Error>

fn receive<F>(self, f: F) where F: FnOnce(AsyncResult<Self::Value, Self::Error>) + Send + 'static

fn await(self) -> AsyncResult<Self::Value, Self::Error>

fn fire(self)

fn and<U: Async<Error=Self::Error>>(self, next: U) -> Future<U::Value, Self::Error>

fn and_then<F, U: Async<Error=Self::Error>>(self, f: F) -> Future<U::Value, Self::Error> where F: FnOnce(Self::Value) -> U + Send + 'static, U::Value: Send + 'static

fn or<A>(self, alt: A) -> Future<Self::Value, A::Error> where A: Async<Value=Self::Value>

fn or_else<F, A>(self, f: F) -> Future<Self::Value, A::Error> where F: FnOnce(Self::Error) -> A + Send + 'static, A: Async<Value=Self::Value>

impl<T: Send + 'static, E: Send + 'static> Drop for Sender<T, E>

fn drop(&mut self)

impl<T: Send + 'static, E: Send + 'static> Debug for Sender<T, E>

fn fmt(&self, fmt: &mut Formatter) -> Result