pub struct ByteSize(pub u64);
Expand description
Byte size representation.
Tuple Fields§
§0: u64
Implementations§
Source§impl ByteSize
impl ByteSize
Sourcepub const fn kb(size: u64) -> ByteSize
pub const fn kb(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of kilobytes.
Sourcepub const fn kib(size: u64) -> ByteSize
pub const fn kib(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of kibibytes.
Sourcepub const fn mb(size: u64) -> ByteSize
pub const fn mb(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of megabytes.
Sourcepub const fn mib(size: u64) -> ByteSize
pub const fn mib(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of mebibytes.
Sourcepub const fn gb(size: u64) -> ByteSize
pub const fn gb(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of gigabytes.
Sourcepub const fn gib(size: u64) -> ByteSize
pub const fn gib(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of gibibytes.
Sourcepub const fn tb(size: u64) -> ByteSize
pub const fn tb(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of terabytes.
Sourcepub const fn tib(size: u64) -> ByteSize
pub const fn tib(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of tebibytes.
Sourcepub const fn pb(size: u64) -> ByteSize
pub const fn pb(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of petabytes.
Trait Implementations§
Source§impl<T> AddAssign<T> for ByteSize
impl<T> AddAssign<T> for ByteSize
Source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the
+=
operation. Read moreSource§impl AddAssign for ByteSize
impl AddAssign for ByteSize
Source§fn add_assign(&mut self, rhs: ByteSize)
fn add_assign(&mut self, rhs: ByteSize)
Performs the
+=
operation. Read moreSource§impl<T> MulAssign<T> for ByteSize
impl<T> MulAssign<T> for ByteSize
Source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moreSource§impl Ord for ByteSize
impl Ord for ByteSize
Source§impl PartialOrd for ByteSize
impl PartialOrd for ByteSize
Source§impl<T> SubAssign<T> for ByteSize
impl<T> SubAssign<T> for ByteSize
Source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
Performs the
-=
operation. Read moreSource§impl SubAssign for ByteSize
impl SubAssign for ByteSize
Source§fn sub_assign(&mut self, rhs: ByteSize)
fn sub_assign(&mut self, rhs: ByteSize)
Performs the
-=
operation. Read moreimpl Copy for ByteSize
impl Eq 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 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