pub struct ByteSize(/* private fields */);Implementations§
Source§impl ByteSize
impl ByteSize
pub const ZERO: Self
pub const fn from_bytes(bytes: u64) -> Self
pub const fn from_kib(kib: u64) -> Self
pub const fn from_mib(mib: u64) -> Self
pub const fn from_gib(gib: u64) -> Self
pub const fn as_bytes(self) -> u64
pub const fn as_kib(self) -> u64
pub const fn saturating_add(self, other: Self) -> Self
pub const fn saturating_sub(self, other: Self) -> Self
Trait Implementations§
impl Copy for ByteSize
Source§impl<'de> Deserialize<'de> for ByteSize
impl<'de> Deserialize<'de> for ByteSize
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 ByteSize
Source§impl Ord for ByteSize
impl Ord for ByteSize
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 PartialOrd for ByteSize
impl PartialOrd for ByteSize
impl StructuralPartialEq for ByteSize
Auto Trait Implementations§
impl Freeze for ByteSize
impl RefUnwindSafe for ByteSize
impl Send for ByteSize
impl Sync for ByteSize
impl Unpin for ByteSize
impl UnsafeUnpin for ByteSize
impl UnwindSafe for ByteSize
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