Struct metrics::ScopeTimer
source · pub struct ScopeTimer { /* private fields */ }
Implementations§
source§impl ScopeTimer
impl ScopeTimer
sourcepub fn time_scope(timer: Arc<dyn Timer>) -> Self
pub fn time_scope(timer: Arc<dyn Timer>) -> Self
Call this to measure the time to run to the end of the current scope.
It will update the time from the function called till the returned
instance is dropped to timer
.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ScopeTimer
impl Send for ScopeTimer
impl Sync for ScopeTimer
impl Unpin for ScopeTimer
impl !UnwindSafe for ScopeTimer
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