pub struct TrackDurationScope<'a, C: CategoryString, S: AsTraceStrRef> { /* private fields */ }Expand description
Scoped duration guard for a custom track. The duration ends and the trace record is written when the guard is dropped.
Under the hood, when the guard is dropped, it writes a single, complete DurationComplete
event to the track backing virtual thread, which contains both the start time (stored in the
guard) and the end time (determined at drop). This is highly efficient as it only writes a
single record to the trace buffer.
Implementations§
Source§impl<'a, C: CategoryString, S: AsTraceStrRef> TrackDurationScope<'a, C, S>
impl<'a, C: CategoryString, S: AsTraceStrRef> TrackDurationScope<'a, C, S>
Trait Implementations§
Source§impl<'a, C: CategoryString, S: AsTraceStrRef> Drop for TrackDurationScope<'a, C, S>
Available on fuchsia_api_level_at_least=31 only.
impl<'a, C: CategoryString, S: AsTraceStrRef> Drop for TrackDurationScope<'a, C, S>
Available on
fuchsia_api_level_at_least=31 only.Auto Trait Implementations§
impl<'a, C, S> Freeze for TrackDurationScope<'a, C, S>
impl<'a, C, S> RefUnwindSafe for TrackDurationScope<'a, C, S>where
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, C, S> Send for TrackDurationScope<'a, C, S>
impl<'a, C, S> Sync for TrackDurationScope<'a, C, S>
impl<'a, C, S> Unpin for TrackDurationScope<'a, C, S>
impl<'a, C, S> UnsafeUnpin for TrackDurationScope<'a, C, S>where
C: UnsafeUnpin,
S: UnsafeUnpin,
impl<'a, C, S> UnwindSafe for TrackDurationScope<'a, C, S>where
C: UnwindSafe,
S: UnwindSafe,
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