Enum dua::ByteFormat [−][src]
pub enum ByteFormat { Metric, Binary, Bytes, GB, GiB, MB, MiB, }
Expand description
Specifies a way to format bytes
Variants
metric format, based on 1000.
binary format, based on 1024
raw bytes, without additional formatting
only gigabytes without smart-unit
only gibibytes without smart-unit
only megabytes without smart-unit
only mebibytes without smart-unit
Implementations
impl ByteFormat
[src]
impl ByteFormat
[src]pub fn width(self) -> usize
[src]
pub fn total_width(self) -> usize
[src]
pub fn display(self, bytes: u128) -> ByteFormatDisplay
[src]
Trait Implementations
impl Clone for ByteFormat
[src]
impl Clone for ByteFormat
[src]fn clone(&self) -> ByteFormat
[src]
fn clone(&self) -> ByteFormat
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Copy for ByteFormat
[src]
Auto Trait Implementations
impl RefUnwindSafe for ByteFormat
impl Send for ByteFormat
impl Sync for ByteFormat
impl Unpin for ByteFormat
impl UnwindSafe for ByteFormat
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more