Struct jsonrpc_core::io::IoDelegate
[−]
[src]
pub struct IoDelegate<T> where T: Send + Sync + 'static {
// some fields omitted
}
A set of RPC methods and notifications tied to single delegate
struct.
Methods
impl<T> IoDelegate<T> where T: Send + Sync + 'static
[src]
fn new(delegate: Arc<T>) -> Self
Creates new IoDelegate
fn add_method<F>(&mut self, name: &str, closure: F) where F: Fn(&T, Params) -> Result<Value, Error> + Send + Sync + 'static
Add new supported method
fn add_async_method<F>(&mut self, name: &str, closure: F) where F: Fn(&T, Params, Ready) + Send + Sync + 'static
Add new supported asynchronous method
fn add_notification<F>(&mut self, name: &str, closure: F) where F: Fn(&T, Params) + Send + Sync + 'static
Add new supported notification