pub trait EventSource: Send + Sync {
// Required method
fn next(&self, cx: &mut Cx) -> Result<Option<Event>>;
// Provided method
fn close(&self, _cx: &mut Cx) -> Result<()> { ... }
}Expand description
A source that produces a run’s events in order.
The kernel defines the pull contract; libraries supply the production.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".