Struct promise::Promise
[−]
[src]
pub struct Promise { pub handlers: Arc<Mutex<Option<Vec<Handler>>>>, }
Fields
handlers: Arc<Mutex<Option<Vec<Handler>>>>
Methods
impl Promise
[src]
fn new<F>(executor: F) -> Promise where F: Send + 'static + Fn(&Fn(Option<String>), &Fn(Option<String>))
fn then<F1, F2>(&mut self, on_fulfilled: F1, on_rejected: F2) -> &mut Promise where F1: Send + 'static + Fn(Option<String>) -> Option<String>,
F2: Send + 'static + Fn(Option<String>) -> Option<String>
F2: Send + 'static + Fn(Option<String>) -> Option<String>