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.

Implementors§