EthPubSubApiServer

Trait EthPubSubApiServer 

Source
pub trait EthPubSubApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    type Metadata: PubSubMetadata;

    // Required methods
    fn subscribe(
        &self,
        _: Self::Metadata,
        _: Subscriber<Result>,
        _: Kind,
        _: Option<Params>,
    );
    fn unsubscribe(
        &self,
        _: Option<Self::Metadata>,
        _: SubscriptionId,
    ) -> Result<bool>;

    // Provided method
    fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> { ... }
}
Expand description

Eth PUB-SUB rpc interface.

Required Associated Types§

Source

type Metadata: PubSubMetadata

RPC Metadata

Required Methods§

Source

fn subscribe( &self, _: Self::Metadata, _: Subscriber<Result>, _: Kind, _: Option<Params>, )

Subscribe to Eth subscription.

Source

fn unsubscribe( &self, _: Option<Self::Metadata>, _: SubscriptionId, ) -> Result<bool>

Unsubscribe from existing Eth subscription.

Provided Methods§

Source

fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>

Create an IoDelegate, wiring rpc calls to the trait methods.

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§