pub struct CapturedEvent {
pub target: String,
pub level: &'static str,
pub name: &'static str,
pub span: Option<String>,
pub code: Option<LeanDiagnosticCode>,
pub message: String,
pub fields: Vec<(&'static str, String)>,
}Expand description
One captured tracing event.
Built by the per-thread layer installed by DiagnosticCapture. The
code field is populated when an event carries a code = "..."
field whose value matches one of LeanDiagnosticCode::as_str.
fields carries other structured fields verbatim, with values
rendered via fmt::Debug (the standard tracing protocol).
Fields§
§target: StringThe event’s target, e.g. "lean_rs". Tracing assigns the
containing module path by default.
level: &'static strThe event’s level as the lowercase string "error", "warn",
"info", "debug", or "trace".
name: &'static strThe event’s name (assigned by tracing from the source-site
macro), e.g. "event src/host/session.rs:271". Use Self::span
to identify which #[instrument]-style span produced the
event.
span: Option<String>The span name the event was emitted inside, if any. This is
the identifier used by the documented span catalogue
(lean_rs.host.session.import, lean_rs.module.library.open,
…).
code: Option<LeanDiagnosticCode>The diagnostic code attached to this event, if it carries a
code field that matches a known LeanDiagnosticCode.
message: StringThe event’s message field if present, else an empty string.
fields: Vec<(&'static str, String)>Other structured fields ((name, value) pairs), excluding
code and message.
Trait Implementations§
Source§impl Clone for CapturedEvent
impl Clone for CapturedEvent
Source§fn clone(&self) -> CapturedEvent
fn clone(&self) -> CapturedEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CapturedEvent
impl Debug for CapturedEvent
Source§impl PartialEq for CapturedEvent
impl PartialEq for CapturedEvent
Source§fn eq(&self, other: &CapturedEvent) -> bool
fn eq(&self, other: &CapturedEvent) -> bool
self and other values to be equal, and is used by ==.