pub trait EthPubSubApiServer<T>:
Sized
+ Send
+ Sync
+ 'staticwhere
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
re-export of all server traits
Server trait implementation for the EthPubSubApi RPC API.
Required Methods§
Sourcefn subscribe(
&self,
subscription_sink: PendingSubscriptionSink,
kind: SubscriptionKind,
params: Option<Params>,
) -> impl Future<Output = Result<(), SubscriptionError>> + Send
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§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".