Struct bytesize::ByteSize
[−]
[src]
pub struct ByteSize(pub u64);
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][+]
impl PartialEq for ByteSize
[src][+]
impl PartialOrd for ByteSize
[src][+]
fn partial_cmp(&self, __arg_0: &ByteSize) -> Option<Ordering>
[src][−]
fn lt(&self, __arg_0: &ByteSize) -> bool
[src][−]
fn le(&self, __arg_0: &ByteSize) -> bool
[src][−]
fn gt(&self, __arg_0: &ByteSize) -> bool
[src][−]
fn ge(&self, __arg_0: &ByteSize) -> bool
[src][−]
impl Eq for ByteSize
[src]
impl Ord for ByteSize
[src][+]
fn cmp(&self, __arg_0: &ByteSize) -> Ordering
[src][−]
fn max(self, other: Self) -> Self
1.21.0[src][−]
fn min(self, other: Self) -> Self
1.21.0[src][−]
impl Default for ByteSize
[src][+]
impl Display for ByteSize
[src][+]
impl Debug for ByteSize
[src][+]
impl Add<u64> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> ByteSize
[src][−]
impl Add<ByteSize> for u64
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src][−]
impl Mul<u64> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> ByteSize
[src][−]
impl Mul<ByteSize> for u64
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: ByteSize) -> ByteSize
[src][−]
impl Add<u32> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u32) -> ByteSize
[src][−]
impl Add<ByteSize> for u32
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src][−]
impl Mul<u32> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> ByteSize
[src][−]
impl Mul<ByteSize> for u32
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: ByteSize) -> ByteSize
[src][−]
impl Add<u16> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u16) -> ByteSize
[src][−]
impl Add<ByteSize> for u16
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src][−]
impl Mul<u16> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u16) -> ByteSize
[src][−]
impl Mul<ByteSize> for u16
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: ByteSize) -> ByteSize
[src][−]
impl Add<u8> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u8) -> ByteSize
[src][−]
impl Add<ByteSize> for u8
[src][+]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: ByteSize) -> ByteSize
[src][−]
impl Mul<u8> for ByteSize
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u8) -> ByteSize
[src][−]
impl Mul<ByteSize> for u8
[src][+]
type Output = ByteSize
The resulting type after applying the *
operator.