Enum jsonrpc_core::async::Response
[−]
[src]
pub enum Response { Single(Output), Batch(Vec<Output>), }
Response type (potentially asynchronous)
Variants
Single(Output)
Single response
Batch(Vec<Output>)
Batch response
Methods
impl Response
[src]
fn await(self) -> SyncResponse
Blocks current thread and awaits a result.
fn on_result<F>(self, f: F) -> bool where F: FnOnce(SyncResponse) + 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