pub struct DumpLatches { /* private fields */ }Expand description
One-shot diagnostic latches for one model.
The named fields are the latches with a caller that already holds the
struct; keyed covers the long tail of
ATLAS_*_DUMP gates, which are numerous, scattered, and identical in
shape — a field each would be noise, and a static each is the bug.
Implementations§
Source§impl DumpLatches
impl DumpLatches
Sourcepub fn keyed(&self, key: &'static str) -> bool
pub fn keyed(&self, key: &'static str) -> bool
true exactly once per model for key. Use for the ATLAS_*_DUMP
gates that would otherwise each grow a static AtomicBool.
Call it only when the dump is actually wanted — it consumes the shot, so gating on the env var FIRST keeps a disabled dump from burning it.
Trait Implementations§
Source§impl Debug for DumpLatches
impl Debug for DumpLatches
Source§impl Default for DumpLatches
impl Default for DumpLatches
Source§fn default() -> DumpLatches
fn default() -> DumpLatches
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DumpLatches
impl RefUnwindSafe for DumpLatches
impl Send for DumpLatches
impl Sync for DumpLatches
impl Unpin for DumpLatches
impl UnwindSafe for DumpLatches
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