pub trait Subscribe {
type Subscription<Notification>: HandleSubscription<Notification>
where Notification: DeserializeOwned;
// Required method
fn subscribe<'life0, 'life1, 'life2, 'async_trait, Notification>(
&'life0 self,
sub: &'life1 str,
params: RpcParams,
unsub: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Subscription<Notification>>> + 'async_trait>>
where Notification: 'async_trait + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Trait to be implemented by the ws-client for subscribing to the substrate node.
Required Associated Types§
type Subscription<Notification>: HandleSubscription<Notification> where Notification: DeserializeOwned
Required Methods§
fn subscribe<'life0, 'life1, 'life2, 'async_trait, Notification>(
&'life0 self,
sub: &'life1 str,
params: RpcParams,
unsub: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Subscription<Notification>>> + 'async_trait>>where
Notification: 'async_trait + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
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.