Struct metrics::CallOnDrop
source · pub struct CallOnDrop<V, F: ?Sized + Fn(&V)> {
init_value: V,
update_value: F,
}
Expand description
A helper struct that makes it easy to get time spent in a scope.
Fields§
§init_value: V
§update_value: F
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<V, F: ?Sized> RefUnwindSafe for CallOnDrop<V, F>where
F: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, F: ?Sized> Send for CallOnDrop<V, F>
impl<V, F: ?Sized> Sync for CallOnDrop<V, F>
impl<V, F: ?Sized> Unpin for CallOnDrop<V, F>
impl<V, F: ?Sized> UnwindSafe for CallOnDrop<V, F>where
F: UnwindSafe,
V: 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