Struct typed_bytesize::ByteSizeIec
source · pub struct ByteSizeIec(pub u64);
Expand description
Binary prefix bytesize
Tuple Fields§
§0: u64
Implementations§
source§impl ByteSizeIec
impl ByteSizeIec
pub fn b(n: impl Into<u64>) -> Self
pub const fn kib(n: u64) -> Self
pub const fn mib(n: u64) -> Self
pub const fn gib(n: u64) -> Self
pub const fn tib(n: u64) -> Self
pub const fn pib(n: u64) -> Self
pub const fn eib(n: u64) -> Self
sourcepub const fn si(self) -> ByteSizeSi
pub const fn si(self) -> ByteSizeSi
Convert into decimal prefix unit
Trait Implementations§
source§impl Add for ByteSizeIec
impl Add for ByteSizeIec
source§impl AddAssign for ByteSizeIec
impl AddAssign for ByteSizeIec
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl Clone for ByteSizeIec
impl Clone for ByteSizeIec
source§fn clone(&self) -> ByteSizeIec
fn clone(&self) -> ByteSizeIec
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ByteSizeIec
impl Debug for ByteSizeIec
source§impl Default for ByteSizeIec
impl Default for ByteSizeIec
source§fn default() -> ByteSizeIec
fn default() -> ByteSizeIec
Returns the “default value” for a type. Read more
source§impl Display for ByteSizeIec
impl Display for ByteSizeIec
source§impl From<ByteSizeIec> for ByteSizeSi
impl From<ByteSizeIec> for ByteSizeSi
source§fn from(iec: ByteSizeIec) -> Self
fn from(iec: ByteSizeIec) -> Self
Converts to this type from the input type.
source§impl From<ByteSizeIec> for u64
impl From<ByteSizeIec> for u64
source§fn from(bs: ByteSizeIec) -> Self
fn from(bs: ByteSizeIec) -> Self
Converts to this type from the input type.
source§impl From<ByteSizeSi> for ByteSizeIec
impl From<ByteSizeSi> for ByteSizeIec
source§fn from(si: ByteSizeSi) -> Self
fn from(si: ByteSizeSi) -> Self
Converts to this type from the input type.
source§impl From<u64> for ByteSizeIec
impl From<u64> for ByteSizeIec
source§impl FromStr for ByteSizeIec
impl FromStr for ByteSizeIec
source§impl Hash for ByteSizeIec
impl Hash for ByteSizeIec
source§impl<T> Mul<T> for ByteSizeIec
impl<T> Mul<T> for ByteSizeIec
source§impl<T> MulAssign<T> for ByteSizeIec
impl<T> MulAssign<T> for ByteSizeIec
source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moresource§impl Ord for ByteSizeIec
impl Ord for ByteSizeIec
source§fn cmp(&self, other: &ByteSizeIec) -> Ordering
fn cmp(&self, other: &ByteSizeIec) -> Ordering
1.21.0 · source§fn 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
source§impl PartialEq for ByteSizeIec
impl PartialEq for ByteSizeIec
source§fn eq(&self, other: &ByteSizeIec) -> bool
fn eq(&self, other: &ByteSizeIec) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ByteSizeIec
impl PartialOrd for ByteSizeIec
source§fn partial_cmp(&self, other: &ByteSizeIec) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteSizeIec) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl Sub for ByteSizeIec
impl Sub for ByteSizeIec
source§impl SubAssign for ByteSizeIec
impl SubAssign for ByteSizeIec
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for ByteSizeIec
impl Eq for ByteSizeIec
impl StructuralPartialEq for ByteSizeIec
Auto Trait Implementations§
impl Freeze for ByteSizeIec
impl RefUnwindSafe for ByteSizeIec
impl Send for ByteSizeIec
impl Sync for ByteSizeIec
impl Unpin for ByteSizeIec
impl UnwindSafe for ByteSizeIec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more