Struct ethane::connector::subscription::Subscription[][src]

pub struct Subscription<T: DeserializeOwned + Debug, U: Subscribe + Request> {
    pub id: U128,
    // some fields omitted
}

An active subscription

Supports the real-time events namespace. Can be created by calling subscribe. In order to yield the next subscription item call next_item.

Fields

id: U128

The subscription id, which is returned when subscribing

Implementations

impl<T: DeserializeOwned + Debug, U: Subscribe + Request> Subscription<T, U>[src]

pub fn next_item(&mut self) -> Result<T, SubscriptionError>[src]

Yields the next item of this subscription.

pub fn close(self)[src]

Cancel the subscription. This will first unsubscribe and then close the underlying connection.

Trait Implementations

impl<T: DeserializeOwned + Debug, U: Subscribe + Request> Drop for Subscription<T, U>[src]

Auto Trait Implementations

impl<T, U> RefUnwindSafe for Subscription<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<T, U> Send for Subscription<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for Subscription<T, U> where
    T: Sync,
    U: Sync

impl<T, U> Unpin for Subscription<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> UnwindSafe for Subscription<T, U> where
    T: UnwindSafe,
    U: 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, 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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,