pub struct DiagnosticLog { /* private fields */ }Expand description
Diagnostic log collector.
Implementations§
Source§impl DiagnosticLog
impl DiagnosticLog
Sourcepub fn with_stderr(self) -> Self
pub fn with_stderr(self) -> Self
Create a log that writes to stderr.
Sourcepub fn with_max_entries(self, max: usize) -> Self
pub fn with_max_entries(self, max: usize) -> Self
Set maximum entries to keep.
Sourcepub fn record(&mut self, entry: DiagnosticEntry)
pub fn record(&mut self, entry: DiagnosticEntry)
Record a diagnostic entry.
Sourcepub fn entries(&self) -> &[DiagnosticEntry]
pub fn entries(&self) -> &[DiagnosticEntry]
Get all entries.
Sourcepub fn entries_of_kind(
&self,
kind: DiagnosticEventKind,
) -> Vec<&DiagnosticEntry>
pub fn entries_of_kind( &self, kind: DiagnosticEventKind, ) -> Vec<&DiagnosticEntry>
Get entries of a specific kind.
Trait Implementations§
Source§impl Debug for DiagnosticLog
impl Debug for DiagnosticLog
Source§impl Default for DiagnosticLog
impl Default for DiagnosticLog
Source§fn default() -> DiagnosticLog
fn default() -> DiagnosticLog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DiagnosticLog
impl RefUnwindSafe for DiagnosticLog
impl Send for DiagnosticLog
impl Sync for DiagnosticLog
impl Unpin for DiagnosticLog
impl UnwindSafe for DiagnosticLog
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