pub struct Diagnostic { /* private fields */ }Expand description
Captures an available synchronous stack once. Capture/symbolization itself is not strictly resource bounded; only retained output is bounded.
Implementations§
Source§impl Diagnostic
impl Diagnostic
pub fn capture( category: DiagnosticCategory, site: CaptureSite, cause: DiagnosticCause, ) -> Self
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
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.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more