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§
Sourcetype Metadata: PubSubMetadata
type Metadata: PubSubMetadata
RPC Metadata
Required Methods§
Sourcefn subscribe(
&self,
_: Self::Metadata,
_: Subscriber<Result>,
_: Kind,
_: Option<Params>,
)
fn subscribe( &self, _: Self::Metadata, _: Subscriber<Result>, _: Kind, _: Option<Params>, )
Subscribe to Eth subscription.
Sourcefn unsubscribe(
&self,
_: Option<Self::Metadata>,
_: SubscriptionId,
) -> Result<bool>
fn unsubscribe( &self, _: Option<Self::Metadata>, _: SubscriptionId, ) -> Result<bool>
Unsubscribe from existing Eth subscription.
Provided Methods§
Sourcefn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
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.