pub struct Diagnostic { /* private fields */ }Expand description
Retains safe diagnostic facts without native stack capture or resolution. Native stacks are explicitly deferred, not claimed captured or repaired.
Implementations§
Source§impl Diagnostic
impl Diagnostic
Sourcepub fn project_simple_bounded(source: &BoundedDiagnostic) -> Option<Self>
pub fn project_simple_bounded(source: &BoundedDiagnostic) -> Option<Self>
Project a simple fixed capture after leaving a strict request account. This preserves the source occurrence and capture site; enriched fixed causes are rejected rather than silently losing their facts.
pub fn capture( category: DiagnosticCategory, site: CaptureSite, cause: DiagnosticCause, ) -> Self
pub fn deferred_stack(&self) -> Option<DeferredDiagnosticStack>
Sourcepub fn capture_panic(info: &PanicHookInfo<'_>, stage: DiagnosticStage) -> Self
pub fn capture_panic(info: &PanicHookInfo<'_>, stage: DiagnosticStage) -> Self
Called by the ONE process hook before unwind. Does not read the panic payload. Installing/chaining hooks and scoped context belong to the host.
Sourcepub fn wrap(self, cause: DiagnosticCause) -> Self
pub fn wrap(self, cause: DiagnosticCause) -> Self
Add outer context without replacing original occurrence or stack.
pub const fn id(&self) -> u64
Sourcepub fn occurrence(&self) -> DiagnosticOccurrence
pub fn occurrence(&self) -> DiagnosticOccurrence
Borrow the existing occurrence without capturing a new stack or identity.
pub fn with_task(self, registered_task: DiagnosticCode) -> Self
Sourcepub fn with_scope(self, scope: DbScopeLogFields) -> Self
pub fn with_scope(self, scope: DbScopeLogFields) -> Self
Only the existing checked scope formatter can supply this field.
pub const fn category(&self) -> DiagnosticCategory
Sourcepub fn during_cleanup_of(self, primary: &Diagnostic) -> Self
pub fn during_cleanup_of(self, primary: &Diagnostic) -> Self
Cleanup is a sibling occurrence, not a cause of the primary failure.
Sourcepub fn during_cleanup_of_occurrence(
self,
primary: &DiagnosticOccurrence,
) -> Self
pub fn during_cleanup_of_occurrence( self, primary: &DiagnosticOccurrence, ) -> Self
Relate cleanup to an existing bounded or legacy occurrence without accepting a caller-provided raw ID or duplicating its source details.
Trait Implementations§
Source§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl Display for Diagnostic
impl Display for Diagnostic
Source§impl Error for Diagnostic
impl Error for Diagnostic
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()