pub struct Last<T> { /* private fields */ }
Expand description
Statistic for keeping the most recent sample.
Implementations§
Source§impl<T> Last<T>
impl<T> Last<T>
pub fn with_sample(sample: T) -> Self
Trait Implementations§
Source§impl<T> Statistic for Last<T>
impl<T> Statistic for Last<T>
Source§type Aggregation = T
type Aggregation = T
The type of the statistical aggregation.
Source§fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
fn fold(&mut self, sample: Self::Sample) -> Result<(), FoldError>
Folds a sample into the aggregation of the statistic. Read more
Source§fn fill(
&mut self,
sample: Self::Sample,
_n: NonZeroUsize,
) -> Result<(), FoldError>
fn fill( &mut self, sample: Self::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
Auto Trait Implementations§
impl<T> Freeze for Last<T>where
T: Freeze,
impl<T> RefUnwindSafe for Last<T>where
T: RefUnwindSafe,
impl<T> Send for Last<T>where
T: Send,
impl<T> Sync for Last<T>where
T: Sync,
impl<T> Unpin for Last<T>where
T: Unpin,
impl<T> UnwindSafe for Last<T>where
T: 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.