pub struct Counter { /* private fields */ }Expand description
The count of lost samples on the inlet side.
The counter keeps the number that it expects next. A record above that number adds the difference to the loss. Each sample moves the expected number by one.
Implementations§
Source§impl Counter
impl Counter
Sourcepub fn record(&mut self, number: u64)
pub fn record(&mut self, number: u64)
Read a record.
The first record sets the expected number and counts no loss. A number
below the expected number counts no loss: it adds one to
Counter::backwards, and the counter takes the new number.
Trait Implementations§
impl Eq for Counter
impl StructuralPartialEq for Counter
Auto Trait Implementations§
impl Forget for Counter
impl Freeze for Counter
impl Move for Counter
impl RefUnwindSafe for Counter
impl Send for Counter
impl Sync for Counter
impl Unpin for Counter
impl UnsafeUnpin for Counter
impl UnwindSafe for Counter
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