Trait RpcObject

Source
pub trait RpcObject: RpcSend + RpcRecv { }
Expand description

An object that can be both sent and received over RPC.

This marker trait is blanket-implemented for every qualifying type. It is used to indicate that a type can be both sent and received in the body of a JSON-RPC message.

§Note

We add the 'static lifetime to the supertraits to indicate that the type can’t borrow. This is a simplification that makes it easier to use the types in client code. Servers may prefer borrowing, using the BorrowedRpcObject trait.

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§

Source§

impl<T> RpcObject for T
where T: RpcSend + RpcRecv,