pub struct ProfilerMark { /* private fields */ }Expand description
A begin() marker — RAII guard that records the start
timestamp and the label so the matching end() call can
compute the elapsed time.
Created by ProfilerHandle::begin(label). Consume with
end() to push a ProfileEntry into the entries signal.
Dropping the marker without calling end() discards the
measurement silently (we don’t have a place to push a
half-finished entry, and panicking on drop is hostile).
Implementations§
Source§impl ProfilerMark
Inherent implementation of ProfilerMark.
impl ProfilerMark
Inherent implementation of ProfilerMark.
Sourcepub fn end(self)
pub fn end(self)
Closes the measurement started by begin() and pushes
the resulting ProfileEntry into the entries signal.
After calling end(), the marker is consumed and
cannot be reused. Calling end() twice is a no-op on
the second call — the marker is moved into the first
call, so the borrow checker prevents a second
invocation in well-typed code.