pub struct NamespaceUsage {
pub ops: u64,
pub bytes: u64,
}Expand description
A fixed-window namespace counter. u64 also holds sums across shards.
Fields§
§ops: u64Admitted writes.
bytes: u64Admitted upload bytes.
Implementations§
Source§impl NamespaceUsage
impl NamespaceUsage
Sourcepub fn delta_from(self, older: Self) -> Option<Self>
pub fn delta_from(self, older: Self) -> Option<Self>
Add a nondecreasing cumulative counter’s delta.
Sourcepub fn checked_add(self, other: Self) -> Option<Self>
pub fn checked_add(self, other: Self) -> Option<Self>
Add two counters, failing closed on overflow.
Trait Implementations§
Source§impl Clone for NamespaceUsage
impl Clone for NamespaceUsage
impl Copy for NamespaceUsage
Source§impl Debug for NamespaceUsage
impl Debug for NamespaceUsage
Source§impl Default for NamespaceUsage
impl Default for NamespaceUsage
impl Eq for NamespaceUsage
Source§impl PartialEq for NamespaceUsage
impl PartialEq for NamespaceUsage
impl StructuralPartialEq for NamespaceUsage
Auto Trait Implementations§
impl Freeze for NamespaceUsage
impl RefUnwindSafe for NamespaceUsage
impl Send for NamespaceUsage
impl Sync for NamespaceUsage
impl Unpin for NamespaceUsage
impl UnsafeUnpin for NamespaceUsage
impl UnwindSafe for NamespaceUsage
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