pub struct ReadableSize(pub u64);
Tuple Fields§
§0: u64
Implementations§
Source§impl ReadableSize
impl ReadableSize
pub const fn kb(count: u64) -> ReadableSize
pub const fn mb(count: u64) -> ReadableSize
pub const fn gb(count: u64) -> ReadableSize
pub const fn as_mb(self) -> u64
Trait Implementations§
Source§impl Clone for ReadableSize
impl Clone for ReadableSize
Source§fn clone(&self) -> ReadableSize
fn clone(&self) -> ReadableSize
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 ReadableSize
impl Debug for ReadableSize
Source§impl<'de> Deserialize<'de> for ReadableSize
impl<'de> Deserialize<'de> for ReadableSize
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ReadableSize
impl Display for ReadableSize
Source§impl Div<u64> for ReadableSize
impl Div<u64> for ReadableSize
Source§type Output = ReadableSize
type Output = ReadableSize
The resulting type after applying the
/
operator.Source§impl Div for ReadableSize
impl Div for ReadableSize
Source§impl FromStr for ReadableSize
impl FromStr for ReadableSize
Source§impl Mul<u64> for ReadableSize
impl Mul<u64> for ReadableSize
Source§type Output = ReadableSize
type Output = ReadableSize
The resulting type after applying the
*
operator.Source§impl PartialEq for ReadableSize
impl PartialEq for ReadableSize
Source§impl PartialOrd for ReadableSize
impl PartialOrd for ReadableSize
Source§impl Serialize for ReadableSize
impl Serialize for ReadableSize
impl Copy for ReadableSize
impl Eq for ReadableSize
impl StructuralPartialEq for ReadableSize
Auto Trait Implementations§
impl Freeze for ReadableSize
impl RefUnwindSafe for ReadableSize
impl Send for ReadableSize
impl Sync for ReadableSize
impl Unpin for ReadableSize
impl UnwindSafe for ReadableSize
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more