pub struct ByteSize(pub u64);Expand description
Re-export of the bytesize crate if the bytesize feature is enabled.
Byte size representation.
Tuple Fields§
§0: u64Implementations§
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.
Sourcepub const fn pib(size: u64) -> ByteSize
pub const fn pib(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of pebibytes.
Sourcepub const fn eb(size: u64) -> ByteSize
pub const fn eb(size: u64) -> ByteSize
Constructs a byte size wrapper from a quantity of exabytes.
Trait Implementations§
Source§impl AddAssign for ByteSize
impl AddAssign for ByteSize
Source§fn add_assign(&mut self, rhs: ByteSize)
fn add_assign(&mut self, rhs: ByteSize)
+= operation. Read moreSource§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)
+= operation. Read moreimpl Copy for ByteSize
Source§impl EnvParsePrimitive for ByteSize
impl EnvParsePrimitive for ByteSize
Source§fn parse(val: &str) -> Result<Self, BoxError>
fn parse(val: &str) -> Result<Self, BoxError>
impl Eq for ByteSize
Source§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)
*= operation. Read more