pub struct MacroDiagGuard(/* private fields */);Expand description
RAII marker: “the log record currently being emitted comes from a
diagnostic macro that already counted itself via note_status”.
The tally has TWO producers which must never overlap: the macros
(Info!/Warn!/Error!/Fatal!/Debug!) count at RAISE time — even when
output is suppressed, which the MAX_ERRORS cap depends on — and the
logger backend counts every OTHER record it prints (raw log::warn! and
friends, which previously printed Warning: lines that no counter ever
saw: the 131 MB witness logged 12,105 Warning: lines and reported
“2 warnings”). This guard is how the logger tells the two apart.
Trait Implementations§
Source§impl Drop for MacroDiagGuard
impl Drop for MacroDiagGuard
Auto Trait Implementations§
impl Freeze for MacroDiagGuard
impl RefUnwindSafe for MacroDiagGuard
impl Send for MacroDiagGuard
impl Sync for MacroDiagGuard
impl Unpin for MacroDiagGuard
impl UnsafeUnpin for MacroDiagGuard
impl UnwindSafe for MacroDiagGuard
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