Struct jsonrpc_core::async::AsyncResult
[−]
[src]
pub struct AsyncResult { // some fields omitted }
Asynchronous result receiving end
Methods
impl AsyncResult
[src]
fn new() -> (AsyncResult, Ready)
Creates new AsyncResult
(receiver) and Ready
(transmitter)
fn on_result<F>(self, f: F) -> bool where F: FnOnce(Res) + Send + 'static
Adds closure to be invoked when result is available.
Callback is invoked right away if result is instantly available and true
is returned.
false
is returned when listener has been added
fn await(self) -> Res
Blocks current thread and awaits for result.
Trait Implementations
impl Debug for AsyncResult
[src]
impl Clone for AsyncResult
[src]
fn clone(&self) -> AsyncResult
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
impl Into<MethodResult> for AsyncResult
[src]
fn into(self) -> MethodResult
Performs the conversion.