pub struct HotGate { /* private fields */ }Expand description
The hot-path verbosity gate — a per-plugin atomic the tracer publishes and the
sync grammar trampoline reads once per guest call (design §4: “a single
relaxed-atomic per-plugin gate load and a predicted-not-taken branch when
off”). The Arc<AtomicU8> is owned by the PluginTracer (its single source
of truth for verbosity) and cloned into the trampoline; a :set plugin.trace-level write updates the atomic, so the very next keystroke reads
the new level with no lock and no cross-plugin cost.
Implementations§
Source§impl HotGate
impl HotGate
Sourcepub fn level(&self) -> TraceLevel
pub fn level(&self) -> TraceLevel
The current effective gate level — the relaxed hot-path load.
Sourcepub fn records_calls(&self) -> bool
pub fn records_calls(&self) -> bool
Will a per-call success record (emitted at Debug) be kept? The hot-path
predicate: false at the default Info gate, so the trampoline does zero
timing / allocation / formatting on the common keystroke.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HotGate
impl RefUnwindSafe for HotGate
impl Send for HotGate
impl Sync for HotGate
impl Unpin for HotGate
impl UnsafeUnpin for HotGate
impl UnwindSafe for HotGate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more