Trait AnyRequest

Source
pub trait AnyRequest:
    Serialize
    + Sized
    + 'static {
    type Response: Serialize + 'static;

    // Required methods
    fn from_method_and_params(method: &str, params: &RawValue) -> Result<Self>;
    fn response_from_method_and_result(
        method: &str,
        params: &RawValue,
    ) -> Result<Self::Response>;
}

Required Associated Types§

Source

type Response: Serialize + 'static

Required Methods§

Source

fn from_method_and_params(method: &str, params: &RawValue) -> Result<Self>

Source

fn response_from_method_and_result( method: &str, params: &RawValue, ) -> Result<Self::Response>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§