Skip to main content

DiagnosticObserver

Trait DiagnosticObserver 

Source
pub trait DiagnosticObserver {
    type Error;

    // Required method
    fn observe(&self, event: DiagnosticEvent) -> Result<(), Self::Error>;
}
Expand description

Caller-owned opt-in sink for payload-free lifecycle events.

Core never logs and never retains the observer or its errors. The shared receiver permits reentrant use and concurrent observation when the caller’s implementation supplies the necessary interior synchronization. Returned errors are ignored; panics follow ordinary Rust panic behavior while the workspace lease retains cleanup ownership during unwinding.

Required Associated Types§

Source

type Error

Caller-specific observation failure.

Required Methods§

Source

fn observe(&self, event: DiagnosticEvent) -> Result<(), Self::Error>

Observes one copy-only event. Returned errors never alter SDK execution.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§