pub trait EventSource: Send + 'static {
// Required method
fn recv(&mut self) -> impl Future<Output = Option<RawEvent>> + Send;
}Expand description
Contract for event input adapters.
Each source reads events from a specific input (stdin, HTTP, NATS) and
yields RawEvents containing the raw payload and an acknowledgment token.
Sources are used as concrete types (not dyn), so async fn is valid
without object-safety concerns.
Required Methods§
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.