pub struct Lap { /* private fields */ }Expand description
一段计时的把手(DT-04 构建期裁剪的唯一入口)。
profiling 关闭时它是个空元组结构:Lap::start() 不读时钟、
elapsed_ns() 直接返回常量 0,于是 run_frame 里那 5 对读表在优化后彻底消失。
之所以做成类型而不是在每个调用点写 #[cfg]:那样会留下 5 处分叉,
而“采集开没开“这件事只该有一个答案(就是这个结构)。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for Lap
impl Freeze for Lap
impl Move for Lap
impl RefUnwindSafe for Lap
impl Send for Lap
impl Sync for Lap
impl Unpin for Lap
impl UnsafeUnpin for Lap
impl UnwindSafe for Lap
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