Skip to main content

RpcMethod

Trait RpcMethod 

Source
pub trait RpcMethod: DeserMethod {
    type Output: Send + Serialize + 'static;
    type Update: Send + Serialize + 'static;
}
Expand description

A method that can be invoked from the RPC system.

Every RpcMethod automatically implements Method.

Required Associated Types§

Source

type Output: Send + Serialize + 'static

A type returned by this method on success.

(The actual result type from the function implementing this method is Result<Output,E>, where E implements RpcError.)

Source

type Update: Send + Serialize + 'static

A type sent by this method on updates.

If this method will never send updates, use the uninhabited NoUpdates type.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§