Trait tor_rpcbase::Method

source ·
pub trait Method: DynMethod {
    type Output: Serialize + Send + 'static;
    type Update: Serialize + Send + 'static;
}
Expand description

A typed method, used to ensure that all implementations of a method have the same success and updates types.

Prefer to implement this trait, rather than DynMethod. (DynMethod represents a type-erased method, with statically-unknown Output and Update types.)

Required Associated Types§

source

type Output: Serialize + Send + 'static

A type returned by this method on success.

source

type Update: Serialize + Send + 'static

A type sent by this method on updates.

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

Implementors§