Trait parity_rpc::v1::PubSub
source · [−]pub trait PubSub: Sized + Send + Sync + 'static {
type Metadata: PubSubMetadata;
fn parity_subscribe(
&self,
_: Self::Metadata,
_: Subscriber<Value>,
_: String,
_: Option<Params>
);
fn parity_unsubscribe(
&self,
_: Option<Self::Metadata>,
_: SubscriptionId
) -> Result<bool>;
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> { ... }
}
Expand description
Parity-specific PUB-SUB rpc interface.
Associated Types
type Metadata: PubSubMetadata
type Metadata: PubSubMetadata
Pub/Sub Metadata
Required methods
fn parity_subscribe(
&self,
_: Self::Metadata,
_: Subscriber<Value>,
_: String,
_: Option<Params>
)
fn parity_subscribe(
&self,
_: Self::Metadata,
_: Subscriber<Value>,
_: String,
_: Option<Params>
)
Subscribe to changes of any RPC method in Parity.
fn parity_unsubscribe(
&self,
_: Option<Self::Metadata>,
_: SubscriptionId
) -> Result<bool>
fn parity_unsubscribe(
&self,
_: Option<Self::Metadata>,
_: SubscriptionId
) -> Result<bool>
Unsubscribe from existing Parity subscription.
Provided methods
fn 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.