pub trait ServiceDispatch:
Send
+ Sync
+ 'static {
// Required method
fn dispatch(
&self,
ctx: &RpcContext,
method_id: u16,
args: &[u8],
codec: &Codec,
) -> Result<Vec<u8>, RpcError>;
}Expand description
Trait for dispatching RPC calls to handler methods.
This is auto-implemented by the #[mill_rpc::service] macro for any type
that implements the generated {Service}Server trait.
Required Methods§
fn dispatch( &self, ctx: &RpcContext, method_id: u16, args: &[u8], codec: &Codec, ) -> Result<Vec<u8>, RpcError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".