pub enum MemoryUnit {
Bytes,
Kilobytes,
Megabytes,
Gigabytes,
Terabytes,
}Expand description
Common units for representing memory size.
Used for determining the most appropriate unit to display a MemorySize.
Variants§
Bytes
8 bits
Kilobytes
1 kilobyte = 1024 bytes
Megabytes
1 megabyte = 1024 kilobytes
Gigabytes
1 gigabyte = 1024 megabytes
Terabytes
1 terabyte = 1024 gigabytes
Trait Implementations§
Source§impl Clone for MemoryUnit
impl Clone for MemoryUnit
Source§fn clone(&self) -> MemoryUnit
fn clone(&self) -> MemoryUnit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MemoryUnit
Source§impl Debug for MemoryUnit
impl Debug for MemoryUnit
impl Eq for MemoryUnit
Source§impl PartialEq for MemoryUnit
impl PartialEq for MemoryUnit
impl StructuralPartialEq for MemoryUnit
Auto Trait Implementations§
impl Freeze for MemoryUnit
impl RefUnwindSafe for MemoryUnit
impl Send for MemoryUnit
impl Sync for MemoryUnit
impl Unpin for MemoryUnit
impl UnsafeUnpin for MemoryUnit
impl UnwindSafe for MemoryUnit
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.