pub struct ChunkCount(/* private fields */);Expand description
A checked non-negative item or transaction count.
Implementations§
Source§impl ChunkCount
impl ChunkCount
Sourcepub fn checked_add(self, other: Self) -> Result<Self, ChunkError>
pub fn checked_add(self, other: Self) -> Result<Self, ChunkError>
Adds two counts without wrapping.
§Errors
Returns ChunkError::CountOverflow when the sum exceeds u64.
Sourcepub fn checked_increment(self) -> Result<Self, ChunkError>
pub fn checked_increment(self) -> Result<Self, ChunkError>
Trait Implementations§
Source§impl Clone for ChunkCount
impl Clone for ChunkCount
Source§fn clone(&self) -> ChunkCount
fn clone(&self) -> ChunkCount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChunkCount
Source§impl Debug for ChunkCount
impl Debug for ChunkCount
Source§impl Default for ChunkCount
impl Default for ChunkCount
Source§fn default() -> ChunkCount
fn default() -> ChunkCount
Returns the “default value” for a type. Read more
impl Eq for ChunkCount
Source§impl Hash for ChunkCount
impl Hash for ChunkCount
Source§impl Ord for ChunkCount
impl Ord for ChunkCount
Source§fn cmp(&self, other: &ChunkCount) -> Ordering
fn cmp(&self, other: &ChunkCount) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ChunkCount
impl PartialEq for ChunkCount
Source§impl PartialOrd for ChunkCount
impl PartialOrd for ChunkCount
impl StructuralPartialEq for ChunkCount
Auto Trait Implementations§
impl Freeze for ChunkCount
impl RefUnwindSafe for ChunkCount
impl Send for ChunkCount
impl Sync for ChunkCount
impl Unpin for ChunkCount
impl UnsafeUnpin for ChunkCount
impl UnwindSafe for ChunkCount
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