Struct gj::PromiseFulfiller [] [src]

pub struct PromiseFulfiller<T, E> where T: 'static, E: 'static + FulfillerDropped {
    // some fields omitted
}

A handle that can be used to fulfill or reject a promise. If you think of a promise as the receiving end of a oneshot channel, then this is the sending end.

When a PromiseFulfiller<T,E> is dropped without receiving a fulfill() or reject() call, its promise is rejected with the error value E::fulfiller_dropped().

Methods

impl<T, E> PromiseFulfiller<T, E> where T: 'static, E: 'static + FulfillerDropped
[src]

fn fulfill(self, value: T)

fn reject(self, error: E)

Trait Implementations

impl<T, E> Drop for PromiseFulfiller<T, E> where T: 'static, E: 'static + FulfillerDropped
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more