pub struct ByteSize(pub u64);
Expand description
Byte size representation
Tuple Fields§
§0: u64
Implementations§
Source§impl ByteSize
impl ByteSize
pub const fn b(size: u64) -> ByteSize
pub const fn kb(size: u64) -> ByteSize
pub const fn kib(size: u64) -> ByteSize
pub const fn mb(size: u64) -> ByteSize
pub const fn mib(size: u64) -> ByteSize
pub const fn gb(size: u64) -> ByteSize
pub const fn gib(size: u64) -> ByteSize
pub const fn tb(size: u64) -> ByteSize
pub const fn tib(size: u64) -> ByteSize
pub const fn pb(size: u64) -> ByteSize
pub const fn pib(size: u64) -> ByteSize
pub const fn as_u64(&self) -> u64
pub fn to_string_as(&self, si_unit: bool) -> String
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
impl 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