[][src]Struct web3::api::SubscriptionStream

pub struct SubscriptionStream<T: DuplexTransport, I> { /* fields omitted */ }

Stream of notifications from a subscription Given a type deserializable from rpc::Value and a subscription id, yields items of that type as notifications are delivered.

Implementations

impl<T: DuplexTransport, I> SubscriptionStream<T, I>[src]

pub fn id(&self) -> &SubscriptionId[src]

Return the ID of this subscription

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

Unsubscribe from the event represented by this stream

Trait Implementations

impl<T: Debug + DuplexTransport, I: Debug> Debug for SubscriptionStream<T, I> where
    T::NotificationStream: Debug
[src]

impl<T: DuplexTransport, I> Drop for SubscriptionStream<T, I>[src]

impl<T, I> PinnedDrop for SubscriptionStream<T, I> where
    T: DuplexTransport
[src]

impl<T, I> Stream for SubscriptionStream<T, I> where
    T: DuplexTransport,
    I: DeserializeOwned
[src]

type Item = Result<I>

Values yielded by the stream.

impl<'pin, T: DuplexTransport, I> Unpin for SubscriptionStream<T, I> where
    __SubscriptionStream<'pin, T, I>: Unpin
[src]

Auto Trait Implementations

impl<T, I> RefUnwindSafe for SubscriptionStream<T, I> where
    I: RefUnwindSafe,
    T: RefUnwindSafe,
    <T as DuplexTransport>::NotificationStream: RefUnwindSafe

impl<T, I> Send for SubscriptionStream<T, I> where
    I: Send,
    T: Send,
    <T as DuplexTransport>::NotificationStream: Send

impl<T, I> Sync for SubscriptionStream<T, I> where
    I: Sync,
    T: Sync,
    <T as DuplexTransport>::NotificationStream: Sync

impl<T, I> UnwindSafe for SubscriptionStream<T, I> where
    I: UnwindSafe,
    T: UnwindSafe,
    <T as DuplexTransport>::NotificationStream: UnwindSafe

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> 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> 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, 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>,