pub trait EventSource: Send + 'static {
// Required method
fn recv(&mut self) -> impl Future<Output = Option<String>> + Send;
}Expand description
Contract for event input adapters.
Each source reads events from a specific input (stdin, HTTP, NATS) and
yields raw strings (typically JSON lines). 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.