pub struct ByteLen(/* private fields */);Expand description
Whole bytes.
Implementations§
Source§impl ByteLen
impl ByteLen
pub const fn new(value: u64) -> ByteLen
pub const fn get(self) -> u64
Sourcepub fn checked_add(self, other: ByteLen) -> Option<ByteLen>
pub fn checked_add(self, other: ByteLen) -> Option<ByteLen>
Overflow is None; the caller owns the verdict, which is
E_INVALID_ARGS at every site that has one. Choosing an
error story here would force it on every caller.
Trait Implementations§
impl Copy for ByteLen
Source§impl<'de> Deserialize<'de> for ByteLen
impl<'de> Deserialize<'de> for ByteLen
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ByteLen
Source§impl Ord for ByteLen
impl Ord for ByteLen
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ByteLen
impl PartialOrd for ByteLen
impl StructuralPartialEq for ByteLen
Auto Trait Implementations§
impl Freeze for ByteLen
impl RefUnwindSafe for ByteLen
impl Send for ByteLen
impl Sync for ByteLen
impl Unpin for ByteLen
impl UnsafeUnpin for ByteLen
impl UnwindSafe for ByteLen
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