Struct jsonrpc_core::io::AsyncStringResponse
[−]
[src]
pub struct AsyncStringResponse { // some fields omitted }
Asynchronous string response
Methods
impl AsyncStringResponse
[src]
fn on_result<F>(self, f: F) -> bool where F: FnOnce(String) + 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) -> String
Blocks current thread and awaits for a result.