Trait rmp_rpc::Service
[−]
[src]
pub trait Service { type Error: Error; type T: Into<Value>; type E: Into<Value>; fn handle_request(
&mut self,
method: &str,
params: &[Value]
) -> Box<Future<Item = Result<Self::T, Self::E>, Error = Self::Error>>; fn handle_notification(
&mut self,
method: &str,
params: &[Value]
) -> Box<Future<Item = (), Error = Self::Error>>; }
The Service
trait defines how a MessagePack-RPC
server handles requests and notifications.
Associated Types
Required Methods
fn handle_request(
&mut self,
method: &str,
params: &[Value]
) -> Box<Future<Item = Result<Self::T, Self::E>, Error = Self::Error>>
&mut self,
method: &str,
params: &[Value]
) -> Box<Future<Item = Result<Self::T, Self::E>, Error = Self::Error>>
Handle a MessagePack-RPC
request.
fn handle_notification(
&mut self,
method: &str,
params: &[Value]
) -> Box<Future<Item = (), Error = Self::Error>>
&mut self,
method: &str,
params: &[Value]
) -> Box<Future<Item = (), Error = Self::Error>>
Handle a MessagePack-RPC
notification.