alloy_json_rpc

Trait RpcReturn

Source
pub trait RpcReturn:
    DeserializeOwned
    + Debug
    + Send
    + Sync
    + Unpin
    + 'static { }
Expand description

An object that can be used as a JSON-RPC return value.

This marker trait is blanket-implemented for every qualifying type. It is used to indicate that a type can be used as a JSON-RPC return value.

§Note

We add the 'static lifetime bound to indicate that the type can’t borrow. This is a simplification that makes it easier to use the types in client code. It is not suitable for use in server code.

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> RpcReturn for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,