pub struct TapState {
pub time_ms: u128,
pub count: u32,
}Expand description
Persistable tap state — the bytes a driver would write between
tap events. Two fields: the wall-clock ms at which the tap
happened, and the count to persist (which is the layer just
shown, or 0 if we just closed the cycle by hitting max_level).
Embedders can store a TapState in any backing they like (file,
memory, an in-process map keyed by shell PID, a test fixture).
Fields§
§time_ms: u128Wall-clock time of the previous tap, in milliseconds since the UNIX epoch (or any monotonic source the embedder picks — the rule only inspects differences).
count: u32Persisted count from the previous tap. 0 means “cycle was
just closed; next tap starts fresh”; non-zero means “previous
tap showed layer N, advance to N+1 if rapid”.
Trait Implementations§
impl Copy for TapState
impl Eq for TapState
impl StructuralPartialEq for TapState
Auto Trait Implementations§
impl Freeze for TapState
impl RefUnwindSafe for TapState
impl Send for TapState
impl Sync for TapState
impl Unpin for TapState
impl UnsafeUnpin for TapState
impl UnwindSafe for TapState
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