Enum xbytes::UnitPrefix
source · pub enum UnitPrefix {
Show 16 variants
Kilo,
Kibi,
Mega,
Mebi,
Giga,
Gibi,
Tera,
Tebi,
Peta,
Pebi,
Exa,
Exbi,
Zetta,
Zebi,
Yotta,
Yobi,
}Variants§
Implementations§
source§impl UnitPrefix
impl UnitPrefix
pub const DECIMAL: [UnitPrefix; 8] = _
pub const BINARY: [UnitPrefix; 8] = _
pub const ALL: [UnitPrefix; 16] = _
pub const MIN: UnitPrefix = Kilo
pub const MAX: UnitPrefix = { { Yobi } }
pub const fn is_decimal(&self) -> bool
pub const fn is_binary(&self) -> bool
pub const fn index(&self) -> usize
pub const fn decimal(&self) -> Self
pub const fn binary(&self) -> Self
pub const fn effective_value(&self) -> Int
pub const fn symbol(&self) -> &'static str
pub const fn symbol_long(&self) -> &'static str
pub const fn symbol_initials(&self) -> &'static str
Trait Implementations§
source§impl Clone for UnitPrefix
impl Clone for UnitPrefix
source§fn clone(&self) -> UnitPrefix
fn clone(&self) -> UnitPrefix
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 UnitPrefix
impl Debug for UnitPrefix
source§impl Display for UnitPrefix
impl Display for UnitPrefix
source§impl From<UnitPrefix> for Unit
impl From<UnitPrefix> for Unit
source§fn from(prefix: UnitPrefix) -> Self
fn from(prefix: UnitPrefix) -> Self
Converts to this type from the input type.
source§impl FromStr for UnitPrefix
impl FromStr for UnitPrefix
source§impl Ord for UnitPrefix
impl Ord for UnitPrefix
source§fn cmp(&self, other: &UnitPrefix) -> Ordering
fn cmp(&self, other: &UnitPrefix) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for UnitPrefix
impl PartialEq for UnitPrefix
source§fn eq(&self, other: &UnitPrefix) -> bool
fn eq(&self, other: &UnitPrefix) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for UnitPrefix
impl PartialOrd for UnitPrefix
source§fn partial_cmp(&self, other: &UnitPrefix) -> Option<Ordering>
fn partial_cmp(&self, other: &UnitPrefix) -> Option<Ordering>
1.0.0 · source§fn 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 moreimpl Copy for UnitPrefix
impl Eq for UnitPrefix
impl StructuralEq for UnitPrefix
impl StructuralPartialEq for UnitPrefix
Auto Trait Implementations§
impl RefUnwindSafe for UnitPrefix
impl Send for UnitPrefix
impl Sync for UnitPrefix
impl Unpin for UnitPrefix
impl UnwindSafe for UnitPrefix
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