pub trait EventSink {
// Required method
fn emit(&self, event: &FabricEvent);
}Expand description
Trait for consuming fabric events.
Implementations decide what to do with events — log them, store them, forward them to an external system, or discard them.
Built-in implementations:
NullSink— discards all events (default forno_std).StdoutSink— prints events to stdout (requiresstdfeature).EventRingBuffer— no-op via this trait; useEventRingBuffer::pushdirectly.
Optional feature-gated implementations:
JsonEventSink— one-line JSON to stdout (requiresjson-logfeature).
Required Methods§
Sourcefn emit(&self, event: &FabricEvent)
fn emit(&self, event: &FabricEvent)
Consume an event. Implementations should not block.
Implementors§
impl EventSink for FileAndSocketSink
impl EventSink for JsonEventSink
impl EventSink for EventRingBuffer
impl EventSink for NullSink
impl EventSink for StdoutSink
Available on crate feature
std only.