pub struct Reset<F, R> { /* private fields */ }
Expand description
Applies an arbitrary reset function to a Statistic
.
Implementations§
Trait Implementations§
Source§impl<F, R> Statistic for Reset<F, R>
impl<F, R> Statistic for Reset<F, R>
Source§type Aggregation = <F as Statistic>::Aggregation
type Aggregation = <F as Statistic>::Aggregation
The type of the statistical aggregation.
Source§fn fold(&mut self, sample: F::Sample) -> Result<(), FoldError>
fn fold(&mut self, sample: F::Sample) -> Result<(), FoldError>
Folds a sample into the aggregation of the statistic. Read more
Source§fn fill(&mut self, sample: F::Sample, n: NonZeroUsize) -> Result<(), FoldError>
fn fill(&mut self, sample: F::Sample, n: NonZeroUsize) -> Result<(), FoldError>
Folds a sample into the aggregation of a statistic
n
(one or more) times. Read moreSource§fn aggregation(&self) -> Option<Self::Aggregation>
fn aggregation(&self) -> Option<Self::Aggregation>
Gets the statistical aggregation. Read more
impl<F: Copy, R: Copy> Copy for Reset<F, R>
Auto Trait Implementations§
impl<F, R> Freeze for Reset<F, R>
impl<F, R> RefUnwindSafe for Reset<F, R>where
F: RefUnwindSafe,
R: RefUnwindSafe,
impl<F, R> Send for Reset<F, R>
impl<F, R> Sync for Reset<F, R>
impl<F, R> Unpin for Reset<F, R>
impl<F, R> UnwindSafe for Reset<F, R>where
F: UnwindSafe,
R: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<F> StatisticExt for Fwhere
F: Statistic,
impl<F> StatisticExt for Fwhere
F: Statistic,
Source§fn get_aggregation_and_reset(&mut self) -> Option<Self::Aggregation>
fn get_aggregation_and_reset(&mut self) -> Option<Self::Aggregation>
Gets the statistical aggregation and resets the statistic.