Struct DiagnosticSummary
pub struct DiagnosticSummary {
pub capacity: usize,
pub minimum: Severity,
pub retained: DiagnosticCounts,
pub evicted: u64,
/* private fields */
}Expand description
Fixed-size snapshot of collector configuration and counters.
Constructed without allocation by Diagnostics::summary. Counts describe
retained records, not a lifetime event total; filtered/rejected input is absent.
Fields§
§capacity: usize§minimum: SeverityCurrent recording threshold; changing it does not remove older records.
retained: DiagnosticCounts§evicted: u64Records removed by capacity pressure since the last Diagnostics::clear.
This counts records, not occurrences, and saturates at u64::MAX.
Implementations§
§impl DiagnosticSummary
impl DiagnosticSummary
pub const fn for_severity(&self, severity: Severity) -> DiagnosticCounts
pub const fn for_severity(&self, severity: Severity) -> DiagnosticCounts
Counts for one severity, including zero counts when it has no records.
use ferravex_engine::diagnostics::{DiagnosticCounts, Diagnostics, Severity};
let mut diagnostics = Diagnostics::new(2, Severity::Info);
diagnostics.record(1, Severity::Error, "load.failed", "Missing scene")?;
assert_eq!(diagnostics.summary().for_severity(Severity::Error),
DiagnosticCounts { records: 1, occurrences: 1 });Trait Implementations§
§impl Clone for DiagnosticSummary
impl Clone for DiagnosticSummary
§fn clone(&self) -> DiagnosticSummary
fn clone(&self) -> DiagnosticSummary
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for DiagnosticSummary
impl Debug for DiagnosticSummary
§impl PartialEq for DiagnosticSummary
impl PartialEq for DiagnosticSummary
impl Copy for DiagnosticSummary
impl Eq for DiagnosticSummary
impl StructuralPartialEq for DiagnosticSummary
Auto Trait Implementations§
impl Freeze for DiagnosticSummary
impl RefUnwindSafe for DiagnosticSummary
impl Send for DiagnosticSummary
impl Sync for DiagnosticSummary
impl Unpin for DiagnosticSummary
impl UnwindSafe for DiagnosticSummary
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