Struct phoenix::quantities::BaseUnits
source · #[repr(transparent)]pub struct BaseUnits { /* private fields */ }Implementations§
source§impl BaseUnits
impl BaseUnits
pub const ZERO: Self = _
pub const ONE: Self = _
pub const MAX: Self = _
pub const MIN: Self = _
pub fn as_u128(&self) -> u128
pub fn saturating_sub(self, other: Self) -> Self
pub fn unchecked_div<Divisor: WrapperU64, Quotient: WrapperU64>( self, other: Divisor ) -> Quotient
Trait Implementations§
source§impl AddAssign<BaseUnits> for BaseUnits
impl AddAssign<BaseUnits> for BaseUnits
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moresource§impl Div<BaseUnits> for BaseLots
impl Div<BaseUnits> for BaseLots
§type Output = BaseLotsPerBaseUnit
type Output = BaseLotsPerBaseUnit
The resulting type after applying the
/ operator.source§impl Mul<BaseLotsPerBaseUnit> for BaseUnits
impl Mul<BaseLotsPerBaseUnit> for BaseUnits
source§impl Mul<BaseUnits> for BaseLotsPerBaseUnit
impl Mul<BaseUnits> for BaseLotsPerBaseUnit
source§impl Ord for BaseUnits
impl Ord for BaseUnits
source§impl PartialEq<BaseUnits> for BaseUnits
impl PartialEq<BaseUnits> for BaseUnits
source§impl PartialEq<BaseUnits> for u64
impl PartialEq<BaseUnits> for u64
source§impl PartialOrd<BaseUnits> for BaseUnits
impl PartialOrd<BaseUnits> for BaseUnits
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 moresource§impl SubAssign<BaseUnits> for BaseUnits
impl SubAssign<BaseUnits> for BaseUnits
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl Copy for BaseUnits
impl Eq for BaseUnits
impl Pod for BaseUnits
Auto Trait Implementations§
impl RefUnwindSafe for BaseUnits
impl Send for BaseUnits
impl Sync for BaseUnits
impl Unpin for BaseUnits
impl UnwindSafe for BaseUnits
Blanket Implementations§
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.