pub trait RpcService: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn handle_method(
&self,
method_id: MethodId,
params: &[u8],
) -> Result<Vec<u8>, RpcError>;
fn methods(&self) -> Vec<MethodId>;
}Expand description
RPC service handler trait
Required Methods§
Sourcefn handle_method(
&self,
method_id: MethodId,
params: &[u8],
) -> Result<Vec<u8>, RpcError>
fn handle_method( &self, method_id: MethodId, params: &[u8], ) -> Result<Vec<u8>, RpcError>
Handle RPC method call