pub struct Fold { /* private fields */ }Expand description
One frame key’s series, as a reader folds its frames (v2 §2.18–§2.21):
the key’s crate::frame::Reader, the epoch it reads its samples
under, and each counter series’ last sample.
- The epoch is the run. A frame the reader reads as its first, as another run’s or as a rewind starts a new epoch; a gap does not. So two samples are of one epoch, established in band, when no frame between them was read so, and of two otherwise: a pair across a rewind is a reset, never a decrease (v2 §2.19).
- A pair is two consecutive samples of one counter series, whatever
was omitted, unknown or lost between them: two included values are
exact (v2 §2.18). It is judged by
crate::telemetry::pair, with no presence: the epoch is always in band. - Each frame is handed over in the order it arrived, with its arrival on the reader’s monotonic clock, the time base of a pair whose record time is unknown (v2 §2.21).
Implementations§
Source§impl Fold
impl Fold
Sourcepub fn refuse(&mut self, stamp: Stamp)
pub fn refuse(&mut self, stamp: Stamp)
Notes a frame at stamp its layout refused (core §7.7): never
applied, so the next frame follows a gap (frame::Reader::refuse).
Sourcepub fn apply(
&mut self,
layout: &Layout,
series: &[FieldSeries],
stamp: Stamp,
frame: &Frame,
arrival_ns: i128,
) -> Folded
pub fn apply( &mut self, layout: &Layout, series: &[FieldSeries], stamp: Stamp, frame: &Frame, arrival_ns: i128, ) -> Folded
Folds a frame of the key: stamp its envelope’s, frame its body
read under layout, series the resource’s declared series
(Series::Declared) and arrival_ns when it arrived, on the
reader’s monotonic clock.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Fold
impl Freeze for Foldwhere
*const u8 is !null: Freeze,
PhantomData<Track>: Freeze,
PhantomData<Seq>: Freeze,
*const LeafNode<usize, Last> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(usize, Last)>>: Freeze,
impl Move for Fold
impl RefUnwindSafe for Fold
impl Send for Fold
impl Sync for Fold
impl Unpin for Fold
impl UnsafeUnpin for Foldwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Track>: UnsafeUnpin,
PhantomData<Seq>: UnsafeUnpin,
*const LeafNode<usize, Last> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(usize, Last)>>: UnsafeUnpin,
impl UnwindSafe for Fold
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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