Struct jsonrpc_core::commander::Commander
[−]
[src]
pub struct Commander { /* fields omitted */ }
Commands executor.
Methods
impl Commander
[src]
fn new() -> Self
Creates new executor
fn add_method<C>(&self, name: String, command: C) where C: MethodCommand + 'static
Add supported method to this executor
fn add_notification<C>(&self, name: String, command: C) where C: NotificationCommand + 'static
Add supported notification to this executor
fn add_subscription<C>(&self,
subscribe: String,
subscription: String,
unsubscribe: String,
command: C) where C: SubscriptionCommand + 'static
subscribe: String,
subscription: String,
unsubscribe: String,
command: C) where C: SubscriptionCommand + 'static
Add supported notification to this executor
fn add_methods(&self, methods: HashMap<String, Box<MethodCommand>>)
Add supported methods to this executor
fn add_notifications(&self,
notifications: HashMap<String, Box<NotificationCommand>>)
notifications: HashMap<String, Box<NotificationCommand>>)
Add supported notifications to this executor
fn add_subscriptions(&self,
subscriptions: HashMap<(String, String, String), Box<SubscriptionCommand>>)
subscriptions: HashMap<(String, String, String), Box<SubscriptionCommand>>)
Add supported subscriptions to this executor
fn execute_method<A: 'static>(&self,
name: String,
params: Params,
handler: Handler<A, Data, SubscriptionOutput>,
session: Option<Session>)
name: String,
params: Params,
handler: Handler<A, Data, SubscriptionOutput>,
session: Option<Session>)
Execute method identified by name
with given params
.
fn execute_notification(&self, name: String, params: Params)
Execute notification identified by name
with given params
.