Struct typed_bytesize::ByteSizeSi
source · pub struct ByteSizeSi(pub u64);
Expand description
Decimal prefix bytesize
Tuple Fields§
§0: u64
Implementations§
source§impl ByteSizeSi
impl ByteSizeSi
pub fn b(n: impl Into<u64>) -> Self
pub const fn kb(n: u64) -> Self
pub const fn mb(n: u64) -> Self
pub const fn gb(n: u64) -> Self
pub const fn tb(n: u64) -> Self
pub const fn pb(n: u64) -> Self
pub const fn eb(n: u64) -> Self
sourcepub const fn iec(self) -> ByteSizeIec
pub const fn iec(self) -> ByteSizeIec
Convert into binary prefix unit
Trait Implementations§
source§impl Add for ByteSizeSi
impl Add for ByteSizeSi
source§impl AddAssign for ByteSizeSi
impl AddAssign for ByteSizeSi
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl Clone for ByteSizeSi
impl Clone for ByteSizeSi
source§fn clone(&self) -> ByteSizeSi
fn clone(&self) -> ByteSizeSi
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 ByteSizeSi
impl Debug for ByteSizeSi
source§impl Default for ByteSizeSi
impl Default for ByteSizeSi
source§fn default() -> ByteSizeSi
fn default() -> ByteSizeSi
Returns the “default value” for a type. Read more
source§impl Display for ByteSizeSi
impl Display for ByteSizeSi
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<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<ByteSizeSi> for u64
impl From<ByteSizeSi> for u64
source§fn from(bs: ByteSizeSi) -> Self
fn from(bs: ByteSizeSi) -> Self
Converts to this type from the input type.
source§impl From<u64> for ByteSizeSi
impl From<u64> for ByteSizeSi
source§impl FromStr for ByteSizeSi
impl FromStr for ByteSizeSi
source§impl Hash for ByteSizeSi
impl Hash for ByteSizeSi
source§impl<T> Mul<T> for ByteSizeSi
impl<T> Mul<T> for ByteSizeSi
source§impl<T> MulAssign<T> for ByteSizeSi
impl<T> MulAssign<T> for ByteSizeSi
source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*=
operation. Read moresource§impl Ord for ByteSizeSi
impl Ord for ByteSizeSi
source§fn cmp(&self, other: &ByteSizeSi) -> Ordering
fn cmp(&self, other: &ByteSizeSi) -> 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 ByteSizeSi
impl PartialEq for ByteSizeSi
source§fn eq(&self, other: &ByteSizeSi) -> bool
fn eq(&self, other: &ByteSizeSi) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ByteSizeSi
impl PartialOrd for ByteSizeSi
source§fn partial_cmp(&self, other: &ByteSizeSi) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteSizeSi) -> 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 ByteSizeSi
impl Sub for ByteSizeSi
source§impl SubAssign for ByteSizeSi
impl SubAssign for ByteSizeSi
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for ByteSizeSi
impl Eq for ByteSizeSi
impl StructuralPartialEq for ByteSizeSi
Auto Trait Implementations§
impl Freeze for ByteSizeSi
impl RefUnwindSafe for ByteSizeSi
impl Send for ByteSizeSi
impl Sync for ByteSizeSi
impl Unpin for ByteSizeSi
impl UnwindSafe for ByteSizeSi
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