[][src]Struct ethers_providers::SubscriptionStream

#[must_use = "subscriptions do nothing unless you stream them"]pub struct SubscriptionStream<'a, P: PubsubClient, R: DeserializeOwned> {
    pub id: U256,
    // some fields omitted
}

Streams data from an installed filter via eth_subscribe

Fields

id: U256

The subscription's installed id on the ethereum node

Implementations

impl<'a, P, R> SubscriptionStream<'a, P, R> where
    P: PubsubClient,
    R: DeserializeOwned
[src]

pub fn new(id: U256, provider: &'a Provider<P>) -> Result<Self, P::Error>[src]

Creates a new subscription stream for the provided subscription id

pub async fn unsubscribe(&self) -> Result<bool, ProviderError>[src]

Unsubscribes from the subscription

Trait Implementations

impl<'a, P: PubsubClient, R: DeserializeOwned> Drop for SubscriptionStream<'a, P, R>[src]

impl<P, R> PinnedDrop for SubscriptionStream<'_, P, R> where
    P: PubsubClient,
    R: DeserializeOwned
[src]

impl<'a, P, R> Stream for SubscriptionStream<'a, P, R> where
    P: PubsubClient,
    R: DeserializeOwned
[src]

type Item = R

Values yielded by the stream.

impl<'pin, 'a, P: PubsubClient, R: DeserializeOwned> Unpin for SubscriptionStream<'a, P, R> where
    __SubscriptionStream<'pin, 'a, P, R>: Unpin
[src]

Auto Trait Implementations

impl<'a, P, R> RefUnwindSafe for SubscriptionStream<'a, P, R> where
    P: RefUnwindSafe,
    R: RefUnwindSafe,
    <P as PubsubClient>::NotificationStream: RefUnwindSafe
[src]

impl<'a, P, R> Send for SubscriptionStream<'a, P, R> where
    R: Send,
    <P as PubsubClient>::NotificationStream: Send
[src]

impl<'a, P, R> Sync for SubscriptionStream<'a, P, R> where
    R: Sync,
    <P as PubsubClient>::NotificationStream: Sync
[src]

impl<'a, P, R> UnwindSafe for SubscriptionStream<'a, P, R> where
    P: RefUnwindSafe,
    R: UnwindSafe,
    <P as PubsubClient>::NotificationStream: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<St> StreamExt for St where
    St: Stream + ?Sized
[src]

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,