Struct readable_byte::readable_byte
source · [−]pub struct readable_byte(pub u64);
Expand description
Byte size representation
Tuple Fields
0: u64
Implementations
sourceimpl readable_byte
impl readable_byte
pub const fn b(size: u64) -> readable_byte
pub const fn kb(size: u64) -> readable_byte
pub const fn kib(size: u64) -> readable_byte
pub const fn mb(size: u64) -> readable_byte
pub const fn mib(size: u64) -> readable_byte
pub const fn gb(size: u64) -> readable_byte
pub const fn gib(size: u64) -> readable_byte
pub const fn tb(size: u64) -> readable_byte
pub const fn tib(size: u64) -> readable_byte
pub const fn pb(size: u64) -> readable_byte
pub const fn pib(size: u64) -> readable_byte
pub fn as_u64(&self) -> u64
pub fn to_string_as(&self, si_unit: bool) -> String
Trait Implementations
sourceimpl<T> Add<T> for readable_byte where
T: Into<u64>,
impl<T> Add<T> for readable_byte where
T: Into<u64>,
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the +
operator.
sourcefn add(self, rhs: T) -> readable_byte
fn add(self, rhs: T) -> readable_byte
Performs the +
operation. Read more
sourceimpl Add<readable_byte> for readable_byte
impl Add<readable_byte> for readable_byte
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the +
operator.
sourcefn add(self, rhs: readable_byte) -> readable_byte
fn add(self, rhs: readable_byte) -> readable_byte
Performs the +
operation. Read more
sourceimpl Add<readable_byte> for u16
impl Add<readable_byte> for u16
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the +
operator.
sourcefn add(self, rhs: readable_byte) -> readable_byte
fn add(self, rhs: readable_byte) -> readable_byte
Performs the +
operation. Read more
sourceimpl Add<readable_byte> for u32
impl Add<readable_byte> for u32
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the +
operator.
sourcefn add(self, rhs: readable_byte) -> readable_byte
fn add(self, rhs: readable_byte) -> readable_byte
Performs the +
operation. Read more
sourceimpl Add<readable_byte> for u64
impl Add<readable_byte> for u64
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the +
operator.
sourcefn add(self, rhs: readable_byte) -> readable_byte
fn add(self, rhs: readable_byte) -> readable_byte
Performs the +
operation. Read more
sourceimpl Add<readable_byte> for u8
impl Add<readable_byte> for u8
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the +
operator.
sourcefn add(self, rhs: readable_byte) -> readable_byte
fn add(self, rhs: readable_byte) -> readable_byte
Performs the +
operation. Read more
sourceimpl<T> AddAssign<T> for readable_byte where
T: Into<u64>,
impl<T> AddAssign<T> for readable_byte where
T: Into<u64>,
sourcefn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the +=
operation. Read more
sourceimpl AddAssign<readable_byte> for readable_byte
impl AddAssign<readable_byte> for readable_byte
sourcefn add_assign(&mut self, rhs: readable_byte)
fn add_assign(&mut self, rhs: readable_byte)
Performs the +=
operation. Read more
sourceimpl Clone for readable_byte
impl Clone for readable_byte
sourcefn clone(&self) -> readable_byte
fn clone(&self) -> readable_byte
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for readable_byte
impl Debug for readable_byte
sourceimpl Default for readable_byte
impl Default for readable_byte
sourcefn default() -> readable_byte
fn default() -> readable_byte
Returns the “default value” for a type. Read more
sourceimpl Display for readable_byte
impl Display for readable_byte
sourceimpl FromStr for readable_byte
impl FromStr for readable_byte
sourceimpl Hash for readable_byte
impl Hash for readable_byte
sourceimpl<T> Mul<T> for readable_byte where
T: Into<u64>,
impl<T> Mul<T> for readable_byte where
T: Into<u64>,
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: T) -> readable_byte
fn mul(self, rhs: T) -> readable_byte
Performs the *
operation. Read more
sourceimpl Mul<readable_byte> for u16
impl Mul<readable_byte> for u16
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: readable_byte) -> readable_byte
fn mul(self, rhs: readable_byte) -> readable_byte
Performs the *
operation. Read more
sourceimpl Mul<readable_byte> for u32
impl Mul<readable_byte> for u32
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: readable_byte) -> readable_byte
fn mul(self, rhs: readable_byte) -> readable_byte
Performs the *
operation. Read more
sourceimpl Mul<readable_byte> for u64
impl Mul<readable_byte> for u64
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: readable_byte) -> readable_byte
fn mul(self, rhs: readable_byte) -> readable_byte
Performs the *
operation. Read more
sourceimpl Mul<readable_byte> for u8
impl Mul<readable_byte> for u8
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the *
operator.
sourcefn mul(self, rhs: readable_byte) -> readable_byte
fn mul(self, rhs: readable_byte) -> readable_byte
Performs the *
operation. Read more
sourceimpl<T> MulAssign<T> for readable_byte where
T: Into<u64>,
impl<T> MulAssign<T> for readable_byte where
T: Into<u64>,
sourcefn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the *=
operation. Read more
sourceimpl Ord for readable_byte
impl Ord for readable_byte
sourcefn cmp(&self, other: &readable_byte) -> Ordering
fn cmp(&self, other: &readable_byte) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<readable_byte> for readable_byte
impl PartialEq<readable_byte> for readable_byte
sourcefn eq(&self, other: &readable_byte) -> bool
fn eq(&self, other: &readable_byte) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &readable_byte) -> bool
fn ne(&self, other: &readable_byte) -> bool
This method tests for !=
.
sourceimpl PartialOrd<readable_byte> for readable_byte
impl PartialOrd<readable_byte> for readable_byte
sourcefn partial_cmp(&self, other: &readable_byte) -> Option<Ordering>
fn partial_cmp(&self, other: &readable_byte) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl<T> Sub<T> for readable_byte where
T: Into<u64>,
impl<T> Sub<T> for readable_byte where
T: Into<u64>,
type Output = readable_byte
type Output = readable_byte
The resulting type after applying the -
operator.
sourcefn sub(self, rhs: T) -> readable_byte
fn sub(self, rhs: T) -> readable_byte
Performs the -
operation. Read more
sourceimpl<T> SubAssign<T> for readable_byte where
T: Into<u64>,
impl<T> SubAssign<T> for readable_byte where
T: Into<u64>,
sourcefn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
Performs the -=
operation. Read more
impl Copy for readable_byte
impl Eq for readable_byte
impl StructuralEq for readable_byte
impl StructuralPartialEq for readable_byte
Auto Trait Implementations
impl RefUnwindSafe for readable_byte
impl Send for readable_byte
impl Sync for readable_byte
impl Unpin for readable_byte
impl UnwindSafe for readable_byte
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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