pub struct TimeSpan { /* private fields */ }Expand description
基于 RAII 的耗时统计器。
离开作用域时自动触发 Drop 打印耗时。
§Examples
use time_span::TimeSpan;
{
let _guard = TimeSpan::new("heavy_work");
// 耗时操作...
} // _guard 离开作用域,自动打印耗时Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimeSpan
impl RefUnwindSafe for TimeSpan
impl Send for TimeSpan
impl Sync for TimeSpan
impl Unpin for TimeSpan
impl UnsafeUnpin for TimeSpan
impl UnwindSafe for TimeSpan
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