Skip to main content

RpcRequest

Trait RpcRequest 

Source
pub trait RpcRequest:
    Serialize
    + DeserializeOwned
    + 'static {
    type Response: Serialize + DeserializeOwned + 'static;

    const NAME: &str;
}
Expand description

Trait representing an RPC request.

Required Associated Constants§

Source

const NAME: &str

Used to identify handlers. This should be unique across all request types.

Required Associated Types§

Source

type Response: Serialize + DeserializeOwned + 'static

The type of the response that will be returned for this request.

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§