Struct raft_engine::ReadableSize
source · [−]pub struct ReadableSize(pub u64);Tuple Fields
0: u64Implementations
sourceimpl 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
sourceimpl Clone for ReadableSize
impl Clone for ReadableSize
sourcefn clone(&self) -> ReadableSize
fn clone(&self) -> ReadableSize
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 ReadableSize
impl Debug for ReadableSize
sourceimpl<'de> Deserialize<'de> for ReadableSize
impl<'de> Deserialize<'de> for ReadableSize
sourcefn 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
sourceimpl Display for ReadableSize
impl Display for ReadableSize
sourceimpl Div<ReadableSize> for ReadableSize
impl Div<ReadableSize> for ReadableSize
sourceimpl Div<u64> for ReadableSize
impl Div<u64> for ReadableSize
type Output = ReadableSize
type Output = ReadableSize
The resulting type after applying the / operator.
sourcefn div(self, rhs: u64) -> ReadableSize
fn div(self, rhs: u64) -> ReadableSize
Performs the / operation. Read more
sourceimpl FromStr for ReadableSize
impl FromStr for ReadableSize
sourceimpl Mul<u64> for ReadableSize
impl Mul<u64> for ReadableSize
type Output = ReadableSize
type Output = ReadableSize
The resulting type after applying the * operator.
sourcefn mul(self, rhs: u64) -> ReadableSize
fn mul(self, rhs: u64) -> ReadableSize
Performs the * operation. Read more
sourceimpl PartialEq<ReadableSize> for ReadableSize
impl PartialEq<ReadableSize> for ReadableSize
sourcefn eq(&self, other: &ReadableSize) -> bool
fn eq(&self, other: &ReadableSize) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourceimpl PartialOrd<ReadableSize> for ReadableSize
impl PartialOrd<ReadableSize> for ReadableSize
sourcefn partial_cmp(&self, other: &ReadableSize) -> Option<Ordering>
fn partial_cmp(&self, other: &ReadableSize) -> 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 Serialize for ReadableSize
impl Serialize for ReadableSize
impl Copy for ReadableSize
impl Eq for ReadableSize
impl StructuralEq for ReadableSize
impl StructuralPartialEq for ReadableSize
Auto Trait Implementations
impl RefUnwindSafe for ReadableSize
impl Send for ReadableSize
impl Sync for ReadableSize
impl Unpin for ReadableSize
impl UnwindSafe for ReadableSize
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