pub trait ControlEventLedger: Send + Sync {
// Required method
fn emit(
&self,
ctx: &ControlEventCtx<'_>,
event: ControlEvent,
) -> Result<EventId, ControlEventError>;
}Expand description
Persistence sink for control events.
emit is synchronous. Callers running under
ControlEventConfig::compliance_mode MUST treat Err as
“abort the originating mutation” (fail closed). Callers in the
default mode may log-and-continue, but the trait never swallows
the failure on their behalf — that policy is per-caller.
Required Methods§
fn emit( &self, ctx: &ControlEventCtx<'_>, event: ControlEvent, ) -> Result<EventId, ControlEventError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".