pub struct GenericTimer<C: TimeContext = GenericContext> {
start: Instant,
_context: PhantomData<C>,
}Expand description
Generic timing implementation shared by all timing contexts
Fields§
§start: Instant§_context: PhantomData<C>Trait Implementations§
Source§impl<T, C: TimeContext> SyncWrapContext<T> for GenericTimer<C>
impl<T, C: TimeContext> SyncWrapContext<T> for GenericTimer<C>
Source§fn after(self, caller_context: &CallerContext, _result: &T)
fn after(self, caller_context: &CallerContext, _result: &T)
Execute the code after the execution of the wrapped body, it provides also the result of the wrapped body Read more
§fn before(&self, caller_context: &CallerContext)
fn before(&self, caller_context: &CallerContext)
Execute the code before the execution of the wrapped body Read more
Auto Trait Implementations§
impl<C> Freeze for GenericTimer<C>
impl<C> RefUnwindSafe for GenericTimer<C>where
C: RefUnwindSafe,
impl<C> Send for GenericTimer<C>where
C: Send,
impl<C> Sync for GenericTimer<C>where
C: Sync,
impl<C> Unpin for GenericTimer<C>where
C: Unpin,
impl<C> UnsafeUnpin for GenericTimer<C>
impl<C> UnwindSafe for GenericTimer<C>where
C: 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more