Skip to main content

Subscription

Trait Subscription 

Source
pub trait Subscription: Send + 'static {
    // Required method
    fn next_event(
        &mut self,
    ) -> impl Future<Output = Option<StreamEvent>> + Send + '_;
}
Expand description

Stream event subscription used by built-in consumers.

Required Methods§

Source

fn next_event( &mut self, ) -> impl Future<Output = Option<StreamEvent>> + Send + '_

Returns the next stream event, or None once the subscription is closed.

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.

Implementations on Foreign Types§

Source§

impl Subscription for Receiver<StreamEvent>

Source§

fn next_event( &mut self, ) -> impl Future<Output = Option<StreamEvent>> + Send + '_

Implementors§