pub enum UnitSystem {
Decimal,
Binary,
}
Expand description
The system to use when parsing prefixes like “KB” and “GB”.
Variants§
Decimal
Use powers of 1000 for prefixes. Parsing “1 KB” returns 1000.
Binary
Use powers of 1024 for prefixes. Parsing “1 KB” returns 1024.
Trait Implementations§
Source§impl Clone for UnitSystem
impl Clone for UnitSystem
Source§fn clone(&self) -> UnitSystem
fn clone(&self) -> UnitSystem
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 UnitSystem
impl Debug for UnitSystem
Source§impl PartialEq for UnitSystem
impl PartialEq for UnitSystem
impl Copy for UnitSystem
impl Eq for UnitSystem
impl StructuralPartialEq for UnitSystem
Auto Trait Implementations§
impl Freeze for UnitSystem
impl RefUnwindSafe for UnitSystem
impl Send for UnitSystem
impl Sync for UnitSystem
impl Unpin for UnitSystem
impl UnwindSafe for UnitSystem
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