Struct bytesize::ByteSize
[−]
[src]
pub struct ByteSize(_);
Byte size representation
Methods
impl ByteSize
[src]
pub fn b(size: u64) -> ByteSize
[src]
pub fn kb(size: u64) -> ByteSize
[src]
pub fn kib(size: u64) -> ByteSize
[src]
pub fn mb(size: u64) -> ByteSize
[src]
pub fn mib(size: u64) -> ByteSize
[src]
pub fn gb(size: u64) -> ByteSize
[src]
pub fn gib(size: u64) -> ByteSize
[src]
pub fn tb(size: u64) -> ByteSize
[src]
pub fn tib(size: u64) -> ByteSize
[src]
pub fn pb(size: u64) -> ByteSize
[src]
pub fn pib(size: u64) -> ByteSize
[src]
pub fn as_u64(&self) -> u64
[src]
pub fn to_string_as(&self, si_unit: bool) -> String
[src]
Trait Implementations
impl Copy for ByteSize
[src]
impl Clone for ByteSize
[src]
fn clone(&self) -> ByteSize
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for ByteSize
[src]
fn eq(&self, __arg_0: &ByteSize) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ByteSize) -> bool
[src]
This method tests for !=
.
impl PartialOrd for ByteSize
[src]
fn partial_cmp(&self, __arg_0: &ByteSize) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &ByteSize) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &ByteSize) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &ByteSize) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &ByteSize) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for ByteSize
[src]
impl Ord for ByteSize
[src]
fn cmp(&self, __arg_0: &ByteSize) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Default for ByteSize
[src]
impl Display for ByteSize
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Debug for ByteSize
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Add<u64> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> ByteSize
[src]
Performs the +
operation.
impl Add<ByteSize> for u64
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src]
Performs the +
operation.
impl Mul<u64> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> ByteSize
[src]
Performs the *
operation.
impl Mul<ByteSize> for u64
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: ByteSize) -> ByteSize
[src]
Performs the *
operation.
impl Add<u32> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u32) -> ByteSize
[src]
Performs the +
operation.
impl Add<ByteSize> for u32
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src]
Performs the +
operation.
impl Mul<u32> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> ByteSize
[src]
Performs the *
operation.
impl Mul<ByteSize> for u32
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: ByteSize) -> ByteSize
[src]
Performs the *
operation.
impl Add<u16> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u16) -> ByteSize
[src]
Performs the +
operation.
impl Add<ByteSize> for u16
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src]
Performs the +
operation.
impl Mul<u16> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u16) -> ByteSize
[src]
Performs the *
operation.
impl Mul<ByteSize> for u16
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: ByteSize) -> ByteSize
[src]
Performs the *
operation.
impl Add<u8> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u8) -> ByteSize
[src]
Performs the +
operation.
impl Add<ByteSize> for u8
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src]
Performs the +
operation.
impl Mul<u8> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u8) -> ByteSize
[src]
Performs the *
operation.
impl Mul<ByteSize> for u8
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: ByteSize) -> ByteSize
[src]
Performs the *
operation.