pub struct Trace<const S: bool, T: TraceValue, const N: usize>{ /* private fields */ }Expand description
A Trace can be used to trace the execution of some code, from an start point through a series of intermediate points. The delta for each step can be recorded.
The ‘start’ method is called first; at each completed step the ‘next’ method is called. At the end (after no more than ‘N’ steps!) the deltas for each step of the trace can be recovered with the ‘trace’ method.
A Trace can be generated for any N, for T in u8, u16, u32, u64, u128 and usize
Implementations§
Source§impl<const S: bool, T, const N: usize> Trace<S, T, N>
impl<const S: bool, T, const N: usize> Trace<S, T, N>
Sourcepub fn start(&mut self)
pub fn start(&mut self)
Record the ticks on start to a region-to-time
Up to N invocations of ‘next’ afterwards will store individual deltas in the trace
Trait Implementations§
impl<const S: bool, T: Copy + TraceValue, const N: usize> Copy for Trace<S, T, N>
Auto Trait Implementations§
impl<const S: bool, T, const N: usize> !Freeze for Trace<S, T, N>
impl<const S: bool, T, const N: usize> !RefUnwindSafe for Trace<S, T, N>
impl<const S: bool, T, const N: usize> !Send for Trace<S, T, N>
impl<const S: bool, T, const N: usize> !Sync for Trace<S, T, N>
impl<const S: bool, T, const N: usize> !Unpin for Trace<S, T, N>
impl<const S: bool, T, const N: usize> !UnwindSafe for Trace<S, T, N>
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