Skip to main content

EthPubSubApiServer

Trait EthPubSubApiServer 

Source
pub trait EthPubSubApiServer<T>:
    Sized
    + Send
    + Sync
    + 'static
where T: RpcObject,
{ // Required method fn subscribe( &self, subscription_sink: PendingSubscriptionSink, kind: SubscriptionKind, params: Option<Params>, ) -> impl Future<Output = Result<(), SubscriptionError>> + Send; // Provided method fn into_rpc(self) -> RpcModule<Self> where T: Send + Sync + 'static { ... } }
Expand description

Server trait implementation for the EthPubSubApi RPC API.

Required Methods§

Source

fn subscribe( &self, subscription_sink: PendingSubscriptionSink, kind: SubscriptionKind, params: Option<Params>, ) -> impl Future<Output = Result<(), SubscriptionError>> + Send

Create an ethereum subscription for the given params

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>
where T: Send + Sync + 'static,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§