Skip to main content

EventsClient

Trait EventsClient 

Source
pub trait EventsClient<E> {
    // Required methods
    fn next_event(&self) -> impl Future<Output = Option<E>> + Send;
    fn latest_event(&self) -> impl Future<Output = Option<E>> + Send;
}
Expand description

Trait for clients that provide events

Required Methods§

Source

fn next_event(&self) -> impl Future<Output = Option<E>> + Send

Get the next event

Source

fn latest_event(&self) -> impl Future<Output = Option<E>> + Send

Get the latest event

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§