ServiceDispatch

Trait ServiceDispatch 

Source
pub trait ServiceDispatch:
    Send
    + Sync
    + 'static {
    // Required method
    fn dispatch(
        &self,
        method_id: u32,
        payload: &[u8],
    ) -> Pin<Box<dyn Future<Output = Result<Frame, RpcError>> + Send + 'static>>;
}
Expand description

Trait for service servers that can be dispatched

Required Methods§

Source

fn dispatch( &self, method_id: u32, payload: &[u8], ) -> Pin<Box<dyn Future<Output = Result<Frame, RpcError>> + Send + 'static>>

Dispatch a method call to this service

Implementors§