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§
Sourcefn next_event(
&mut self,
) -> impl Future<Output = Option<StreamEvent>> + Send + '_
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.