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§
Sourceasync fn next_event(&self) -> Option<Event>
async fn next_event(&self) -> Option<Event>
Fetch the next event from the client.
Sourceasync fn latest_event(&self) -> Option<Event>
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.