pub enum SegmentValue {
Known {
filled: usize,
capacity: usize,
},
Empty,
Unknown {
capacity: usize,
},
}Expand description
Count telemetry, with no fractional/invented segments. Empty has zero cells; Unknown may reserve zero through 64 cells, without marking any as accepted.
Variants§
Implementations§
Source§impl SegmentValue
impl SegmentValue
Sourcepub fn count(self) -> Result<usize, MeterError>
pub fn count(self) -> Result<usize, MeterError>
Validated cell count. Known requires positive capacity and filled <= it.
Trait Implementations§
Source§impl Clone for SegmentValue
impl Clone for SegmentValue
Source§fn clone(&self) -> SegmentValue
fn clone(&self) -> SegmentValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SegmentValue
impl Debug for SegmentValue
Source§impl PartialEq for SegmentValue
impl PartialEq for SegmentValue
impl Copy for SegmentValue
impl Eq for SegmentValue
impl StructuralPartialEq for SegmentValue
Auto Trait Implementations§
impl Freeze for SegmentValue
impl RefUnwindSafe for SegmentValue
impl Send for SegmentValue
impl Sync for SegmentValue
impl Unpin for SegmentValue
impl UnwindSafe for SegmentValue
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