EventsClient

Trait EventsClient 

Source
pub trait EventsClient<Event>:
    Clone
    + Send
    + Sync {
    // Required methods
    async fn next_event(&self) -> Option<Event>;
    async fn latest_event(&self) -> Option<Event>;
}

Required Methods§

Source

async fn next_event(&self) -> Option<Event>

Fetch the next event from the client.

Source

async fn latest_event(&self) -> Option<Event>

Fetch the latest event from the client.

If no event has yet been fetched, the client will call next_event.

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<Event, T: EventsClient<Event> + ?Sized> EventsClient<Event> for Arc<T>
where Arc<T>: Clone + Send + Sync,

Source§

async fn next_event(&self) -> Option<Event>

Source§

async fn latest_event(&self) -> Option<Event>

Implementors§