Skip to main content

RpcConverter

Trait RpcConverter 

Source
pub trait RpcConverter: RpcMethod {
    type Output;

    // Required methods
    fn read_query(&self, r: Box<dyn Read>) -> Result<Self::Output, Error>;
    fn read_response(&self, r: Box<dyn Read>) -> Result<Self::Output, Error>;
}

Required Associated Types§

Required Methods§

Source

fn read_query(&self, r: Box<dyn Read>) -> Result<Self::Output, Error>

Source

fn read_response(&self, r: Box<dyn Read>) -> Result<Self::Output, Error>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T, FQ, FR, O> RpcConverter for (T, FQ, FR)
where T: RpcMethod, T::Query: BinProtRead, T::Response: BinProtRead, FQ: Fn(T::Query) -> O, FR: Fn(T::Query) -> O,

Source§

type Output = O

Source§

fn read_query(&self, r: Box<dyn Read>) -> Result<Self::Output, Error>

Source§

fn read_response(&self, r: Box<dyn Read>) -> Result<Self::Output, Error>

Implementors§