Skip to main content

Module observer

Module observer 

Source
Expand description

KernelObserver trait + panic-resilient ObserverRegistry.

Observer panic policy: first panic evicts. Eviction is recorded in evicted set so subsequent deliveries skip the handle even if a pathological observer were re-inserted with the same handle (it cannot be — next_handle is monotonic).

Traits§

KernelObserver
Sink for KernelEvents. Implementations are invoked in BTreeMap<ObserverHandle, _> order during the post-commit drain of Kernel::step. Panics inside on_event are caught and result in first-panic eviction of the observer (A22).