[−][src]Trait xi_rpc::Handler
A trait for types which can handle RPCs.
Types which implement MethodHandler
are also responsible for implementing
Parser
; Parser
is provided when Self::Notification and Self::Request
can be used with serde::DeserializeOwned.
Associated Types
type Notification: DeserializeOwned
type Request: DeserializeOwned
Required methods
fn handle_notification(&mut self, ctx: &RpcCtx, rpc: Self::Notification)
fn handle_request(
&mut self,
ctx: &RpcCtx,
rpc: Self::Request
) -> Result<Value, RemoteError>
&mut self,
ctx: &RpcCtx,
rpc: Self::Request
) -> Result<Value, RemoteError>