Struct IdleRecorder

Source
pub struct IdleRecorder<T, C: Counter>
where T: BorrowMut<Recorder<C>>,
{ /* private fields */ }
Expand description

This guard denotes that a Recorder is currently idle, and should not be waited on by a SyncHistogram phase-shift.

Implementations§

Source§

impl<C: Counter> IdleRecorder<Recorder<C>, C>

Source

pub fn activate(self) -> Recorder<C>

Mark the wrapped Recorder as active again and return it.

Source

pub fn recorder(&self) -> Recorder<C>

Clone the wrapped Recorder.

Trait Implementations§

Source§

impl<T, C: Debug + Counter> Debug for IdleRecorder<T, C>
where T: BorrowMut<Recorder<C>> + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, C: Counter> Drop for IdleRecorder<T, C>
where T: BorrowMut<Recorder<C>>,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<T, C> Freeze for IdleRecorder<T, C>
where T: Freeze,

§

impl<T, C> RefUnwindSafe for IdleRecorder<T, C>

§

impl<T, C> Send for IdleRecorder<T, C>
where T: Send, C: Send,

§

impl<T, C> Sync for IdleRecorder<T, C>
where T: Sync, C: Sync,

§

impl<T, C> Unpin for IdleRecorder<T, C>
where T: Unpin, C: Unpin,

§

impl<T, C> UnwindSafe for IdleRecorder<T, C>
where T: UnwindSafe, C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.