Struct jsonrpc_core::async::AsyncOutput
[−]
[src]
pub struct AsyncOutput {
// some fields omitted
}Asynchronous Output
Methods
impl AsyncOutput[src]
fn on_result<F>(self, f: F) -> bool where F: FnOnce(SyncOutput) + 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) -> SyncOutput
Blocks current thread and awaits a result
fn from(result: AsyncResult, id: Id, jsonrpc: Version) -> Self
Create new AsyncOutput given AsyncResult, Id and Version