Trait ethers_providers::PubsubClient
source · pub trait PubsubClient: JsonRpcClient {
type NotificationStream: Stream<Item = Box<RawValue>> + Send + Unpin;
// Required methods
fn subscribe<T: Into<U256>>(
&self,
id: T
) -> Result<Self::NotificationStream, Self::Error>;
fn unsubscribe<T: Into<U256>>(&self, id: T) -> Result<(), Self::Error>;
}
Expand description
A transport implementation supporting pub sub subscriptions.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.
Implementors§
source§impl PubsubClient for Ws
Available on crate feature legacy-ws
only.
impl PubsubClient for Ws
Available on crate feature
legacy-ws
only.type NotificationStream = UnboundedReceiver<Box<RawValue>>
source§impl PubsubClient for Ipc
Available on crate feature ipc
and (Unix or Windows) only.
impl PubsubClient for Ipc
Available on crate feature
ipc
and (Unix or Windows) only.