[][src]Struct post::subscriber::Subscription

pub struct Subscription { /* fields omitted */ }

Stream of messages from Publishers

The new function starts the process of subscribing to a publisher. A message could arrive at any point after the call completes. Subscription::wait_for_subscription_complete can be used to listen for the subscription acknowledgement.

All inbound messages are handled during the stream poll. This can mean that a subscriber not handling messages can be deemed in active and it's subscription ended.

The primary means of interacting with a Subscription is through the futures::stream::Stream impl.

Implementations

impl Subscription[src]

pub async fn new(desc: PublisherDesc) -> Result<Subscription, Error>[src]

pub fn description(&self) -> &PublisherDesc[src]

Returns the description used to create the Subscription

pub fn wait_for_subscription_complete(&mut self) -> SubscriptionComplete<'_>

Notable traits for SubscriptionComplete<'a>

impl<'a> Future for SubscriptionComplete<'a> type Output = ();
[src]

Returns a future that completes when the subscription has been acknowledged by the publisher.

Trait Implementations

impl Stream for Subscription[src]

type Item = Bytes

Values yielded by the stream.

Auto Trait Implementations

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> IntoRequest<T> for T[src]

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

impl<T> WithSubscriber for T[src]