Struct bytesize::ByteSize [−][src]
Byte size representation
Implementations
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 Add<ByteSize> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(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<u32> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u32) -> 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<u8> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the +
operator.
fn add(self, rhs: u8) -> ByteSize
[src]
impl Clone for ByteSize
[src]
impl Copy for ByteSize
[src]
impl Debug for ByteSize
[src]
impl Default for ByteSize
[src]
impl Display for ByteSize
[src]
impl Eq for 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<u32> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> 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<u8> for ByteSize
[src]
type Output = ByteSize
The resulting type after applying the *
operator.
fn mul(self, rhs: u8) -> ByteSize
[src]
impl Ord for ByteSize
[src]
fn cmp(&self, other: &ByteSize) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ByteSize> for ByteSize
[src]
impl PartialOrd<ByteSize> for ByteSize
[src]
fn partial_cmp(&self, other: &ByteSize) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ByteSize
[src]
impl StructuralPartialEq for ByteSize
[src]
Auto Trait Implementations
impl RefUnwindSafe for ByteSize
impl Send for ByteSize
impl Sync for ByteSize
impl Unpin for ByteSize
impl UnwindSafe for ByteSize
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,