Struct bytes_size::ByteSize
source · pub struct ByteSize(_);Expand description
Implementations
sourceimpl ByteSize
impl ByteSize
pub fn pib(size: f64) -> Self
pub fn tib(size: f64) -> Self
pub fn gib(size: f64) -> Self
pub fn mib(size: f64) -> Self
pub fn kib(size: f64) -> Self
pub fn pb(size: f64) -> Self
pub fn tb(size: f64) -> Self
pub fn gb(size: f64) -> Self
pub fn mb(size: f64) -> Self
pub fn kb(size: f64) -> Self
pub fn b(size: f64) -> Self
pub fn ib(size: f64) -> Self
sourceimpl ByteSize
impl ByteSize
pub fn to_pib(&self) -> ByteSizeUnit
pub fn to_tib(&self) -> ByteSizeUnit
pub fn to_gib(&self) -> ByteSizeUnit
pub fn to_mib(&self) -> ByteSizeUnit
pub fn to_kib(&self) -> ByteSizeUnit
pub fn to_ib(&self) -> ByteSizeUnit
pub fn to_pb(&self) -> ByteSizeUnit
pub fn to_tb(&self) -> ByteSizeUnit
pub fn to_gb(&self) -> ByteSizeUnit
pub fn to_mb(&self) -> ByteSizeUnit
pub fn to_kb(&self) -> ByteSizeUnit
pub fn to_b(&self) -> ByteSizeUnit
Trait Implementations
sourceimpl Ord for ByteSize
impl Ord for ByteSize
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<ByteSize> for ByteSize
impl PartialOrd<ByteSize> for ByteSize
sourcefn partial_cmp(&self, other: &ByteSize) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteSize) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for ByteSize
impl Eq for ByteSize
impl StructuralEq for ByteSize
impl StructuralPartialEq for ByteSize
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more