pub trait EventSink: Send + Sync {
// Required method
fn record(&self, event: &Event);
// Provided method
fn flush(&self) { ... }
}Expand description
A lossless, ordered consumer of events.
Unlike broadcast subscribers (which may lag and drop), sinks are
invoked synchronously from EventBus::emit and must never lose an
event. Implementations should buffer writes and must not panic;
I/O errors are to be swallowed (optionally logged), never surfaced
into the training loop.