Skip to main content

RpcServerHandler

Trait RpcServerHandler 

Source
pub trait RpcServerHandler<'a> {
    type Method: Deserialize<'a>;
    type Result: Serialize + Deserialize<'a>;
    type Source;

    // Required method
    fn handle_call(
        &'a self,
        method: Self::Method,
        source: Self::Source,
    ) -> RpcResult<Self::Result>;
}
Expand description

RPC server trait

Required Associated Types§

Source

type Method: Deserialize<'a>

Methods to handle

Source

type Result: Serialize + Deserialize<'a>

Result of the methods

Source

type Source

Source of the call (IP address, etc.)

Required Methods§

Source

fn handle_call( &'a self, method: Self::Method, source: Self::Source, ) -> RpcResult<Self::Result>

A method to handle calls

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§