pub enum Number {
Decimal(f64),
StandardForm(StandardForm),
Fraction(GenericFraction<u32>),
}
Expand description
Represents a numeric value that can be either a decimal, a number in standard form, or a fraction with a generic numerator and denominator.
This enum is designed for flexible numeric handling in Rust applications.
Variants§
Decimal(f64)
Represents a floating-point decimal number.
StandardForm(StandardForm)
Represents a number in the StandardForm notation.
Fraction(GenericFraction<u32>)
Represents a fraction with a generic numerator and denominator
Implementations§
Trait Implementations§
Source§impl AddAssign<f32> for Number
impl AddAssign<f32> for Number
Source§fn add_assign(&mut self, other: f32)
fn add_assign(&mut self, other: f32)
Performs the
+=
operation. Read moreSource§impl AddAssign<f64> for Number
impl AddAssign<f64> for Number
Source§fn add_assign(&mut self, other: f64)
fn add_assign(&mut self, other: f64)
Performs the
+=
operation. Read moreSource§impl AddAssign<i16> for Number
impl AddAssign<i16> for Number
Source§fn add_assign(&mut self, other: i16)
fn add_assign(&mut self, other: i16)
Performs the
+=
operation. Read moreSource§impl AddAssign<i32> for Number
impl AddAssign<i32> for Number
Source§fn add_assign(&mut self, other: i32)
fn add_assign(&mut self, other: i32)
Performs the
+=
operation. Read moreSource§impl AddAssign<i64> for Number
impl AddAssign<i64> for Number
Source§fn add_assign(&mut self, other: i64)
fn add_assign(&mut self, other: i64)
Performs the
+=
operation. Read moreSource§impl AddAssign<i8> for Number
impl AddAssign<i8> for Number
Source§fn add_assign(&mut self, other: i8)
fn add_assign(&mut self, other: i8)
Performs the
+=
operation. Read moreSource§impl AddAssign<u16> for Number
impl AddAssign<u16> for Number
Source§fn add_assign(&mut self, other: u16)
fn add_assign(&mut self, other: u16)
Performs the
+=
operation. Read moreSource§impl AddAssign<u32> for Number
impl AddAssign<u32> for Number
Source§fn add_assign(&mut self, other: u32)
fn add_assign(&mut self, other: u32)
Performs the
+=
operation. Read moreSource§impl AddAssign<u64> for Number
impl AddAssign<u64> for Number
Source§fn add_assign(&mut self, other: u64)
fn add_assign(&mut self, other: u64)
Performs the
+=
operation. Read moreSource§impl AddAssign<u8> for Number
impl AddAssign<u8> for Number
Source§fn add_assign(&mut self, other: u8)
fn add_assign(&mut self, other: u8)
Performs the
+=
operation. Read moreSource§impl AddAssign for Number
impl AddAssign for Number
Source§fn add_assign(&mut self, other: Number)
fn add_assign(&mut self, other: Number)
Performs the
+=
operation. Read moreSource§impl DivAssign<f32> for Number
impl DivAssign<f32> for Number
Source§fn div_assign(&mut self, other: f32)
fn div_assign(&mut self, other: f32)
Performs the
/=
operation. Read moreSource§impl DivAssign<f64> for Number
impl DivAssign<f64> for Number
Source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
Performs the
/=
operation. Read moreSource§impl DivAssign<i16> for Number
impl DivAssign<i16> for Number
Source§fn div_assign(&mut self, other: i16)
fn div_assign(&mut self, other: i16)
Performs the
/=
operation. Read moreSource§impl DivAssign<i32> for Number
impl DivAssign<i32> for Number
Source§fn div_assign(&mut self, other: i32)
fn div_assign(&mut self, other: i32)
Performs the
/=
operation. Read moreSource§impl DivAssign<i64> for Number
impl DivAssign<i64> for Number
Source§fn div_assign(&mut self, other: i64)
fn div_assign(&mut self, other: i64)
Performs the
/=
operation. Read moreSource§impl DivAssign<i8> for Number
impl DivAssign<i8> for Number
Source§fn div_assign(&mut self, other: i8)
fn div_assign(&mut self, other: i8)
Performs the
/=
operation. Read moreSource§impl DivAssign<u16> for Number
impl DivAssign<u16> for Number
Source§fn div_assign(&mut self, other: u16)
fn div_assign(&mut self, other: u16)
Performs the
/=
operation. Read moreSource§impl DivAssign<u32> for Number
impl DivAssign<u32> for Number
Source§fn div_assign(&mut self, other: u32)
fn div_assign(&mut self, other: u32)
Performs the
/=
operation. Read moreSource§impl DivAssign<u64> for Number
impl DivAssign<u64> for Number
Source§fn div_assign(&mut self, other: u64)
fn div_assign(&mut self, other: u64)
Performs the
/=
operation. Read moreSource§impl DivAssign<u8> for Number
impl DivAssign<u8> for Number
Source§fn div_assign(&mut self, other: u8)
fn div_assign(&mut self, other: u8)
Performs the
/=
operation. Read moreSource§impl DivAssign for Number
impl DivAssign for Number
Source§fn div_assign(&mut self, other: Number)
fn div_assign(&mut self, other: Number)
Performs the
/=
operation. Read moreSource§impl From<GenericFraction<u32>> for Number
impl From<GenericFraction<u32>> for Number
Source§fn from(value: GenericFraction<u32>) -> Self
fn from(value: GenericFraction<u32>) -> Self
Converts to this type from the input type.
Source§impl From<StandardForm> for Number
impl From<StandardForm> for Number
Source§fn from(value: StandardForm) -> Self
fn from(value: StandardForm) -> Self
Converts to this type from the input type.
Source§impl MulAssign<f32> for Number
impl MulAssign<f32> for Number
Source§fn mul_assign(&mut self, other: f32)
fn mul_assign(&mut self, other: f32)
Performs the
*=
operation. Read moreSource§impl MulAssign<f64> for Number
impl MulAssign<f64> for Number
Source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
Performs the
*=
operation. Read moreSource§impl MulAssign<i16> for Number
impl MulAssign<i16> for Number
Source§fn mul_assign(&mut self, other: i16)
fn mul_assign(&mut self, other: i16)
Performs the
*=
operation. Read moreSource§impl MulAssign<i32> for Number
impl MulAssign<i32> for Number
Source§fn mul_assign(&mut self, other: i32)
fn mul_assign(&mut self, other: i32)
Performs the
*=
operation. Read moreSource§impl MulAssign<i64> for Number
impl MulAssign<i64> for Number
Source§fn mul_assign(&mut self, other: i64)
fn mul_assign(&mut self, other: i64)
Performs the
*=
operation. Read moreSource§impl MulAssign<i8> for Number
impl MulAssign<i8> for Number
Source§fn mul_assign(&mut self, other: i8)
fn mul_assign(&mut self, other: i8)
Performs the
*=
operation. Read moreSource§impl MulAssign<u16> for Number
impl MulAssign<u16> for Number
Source§fn mul_assign(&mut self, other: u16)
fn mul_assign(&mut self, other: u16)
Performs the
*=
operation. Read moreSource§impl MulAssign<u32> for Number
impl MulAssign<u32> for Number
Source§fn mul_assign(&mut self, other: u32)
fn mul_assign(&mut self, other: u32)
Performs the
*=
operation. Read moreSource§impl MulAssign<u64> for Number
impl MulAssign<u64> for Number
Source§fn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
Performs the
*=
operation. Read moreSource§impl MulAssign<u8> for Number
impl MulAssign<u8> for Number
Source§fn mul_assign(&mut self, other: u8)
fn mul_assign(&mut self, other: u8)
Performs the
*=
operation. Read moreSource§impl MulAssign for Number
impl MulAssign for Number
Source§fn mul_assign(&mut self, other: Number)
fn mul_assign(&mut self, other: Number)
Performs the
*=
operation. Read moreSource§impl Ord for Number
impl Ord for Number
Source§impl PartialOrd<f32> for Number
impl PartialOrd<f32> for Number
Source§impl PartialOrd<f64> for Number
impl PartialOrd<f64> for Number
Source§impl PartialOrd<i16> for Number
impl PartialOrd<i16> for Number
Source§impl PartialOrd<i32> for Number
impl PartialOrd<i32> for Number
Source§impl PartialOrd<i64> for Number
impl PartialOrd<i64> for Number
Source§impl PartialOrd<i8> for Number
impl PartialOrd<i8> for Number
Source§impl PartialOrd<u16> for Number
impl PartialOrd<u16> for Number
Source§impl PartialOrd<u32> for Number
impl PartialOrd<u32> for Number
Source§impl PartialOrd<u64> for Number
impl PartialOrd<u64> for Number
Source§impl PartialOrd<u8> for Number
impl PartialOrd<u8> for Number
Source§impl PartialOrd for Number
impl PartialOrd for Number
Source§impl RemAssign<f32> for Number
impl RemAssign<f32> for Number
Source§fn rem_assign(&mut self, other: f32)
fn rem_assign(&mut self, other: f32)
Performs the
%=
operation. Read moreSource§impl RemAssign<f64> for Number
impl RemAssign<f64> for Number
Source§fn rem_assign(&mut self, other: f64)
fn rem_assign(&mut self, other: f64)
Performs the
%=
operation. Read moreSource§impl RemAssign<i16> for Number
impl RemAssign<i16> for Number
Source§fn rem_assign(&mut self, other: i16)
fn rem_assign(&mut self, other: i16)
Performs the
%=
operation. Read moreSource§impl RemAssign<i32> for Number
impl RemAssign<i32> for Number
Source§fn rem_assign(&mut self, other: i32)
fn rem_assign(&mut self, other: i32)
Performs the
%=
operation. Read moreSource§impl RemAssign<i64> for Number
impl RemAssign<i64> for Number
Source§fn rem_assign(&mut self, other: i64)
fn rem_assign(&mut self, other: i64)
Performs the
%=
operation. Read moreSource§impl RemAssign<i8> for Number
impl RemAssign<i8> for Number
Source§fn rem_assign(&mut self, other: i8)
fn rem_assign(&mut self, other: i8)
Performs the
%=
operation. Read moreSource§impl RemAssign<u16> for Number
impl RemAssign<u16> for Number
Source§fn rem_assign(&mut self, other: u16)
fn rem_assign(&mut self, other: u16)
Performs the
%=
operation. Read moreSource§impl RemAssign<u32> for Number
impl RemAssign<u32> for Number
Source§fn rem_assign(&mut self, other: u32)
fn rem_assign(&mut self, other: u32)
Performs the
%=
operation. Read moreSource§impl RemAssign<u64> for Number
impl RemAssign<u64> for Number
Source§fn rem_assign(&mut self, other: u64)
fn rem_assign(&mut self, other: u64)
Performs the
%=
operation. Read moreSource§impl RemAssign<u8> for Number
impl RemAssign<u8> for Number
Source§fn rem_assign(&mut self, other: u8)
fn rem_assign(&mut self, other: u8)
Performs the
%=
operation. Read moreSource§impl RemAssign for Number
impl RemAssign for Number
Source§fn rem_assign(&mut self, other: Number)
fn rem_assign(&mut self, other: Number)
Performs the
%=
operation. Read moreSource§impl SubAssign<f32> for Number
impl SubAssign<f32> for Number
Source§fn sub_assign(&mut self, other: f32)
fn sub_assign(&mut self, other: f32)
Performs the
-=
operation. Read moreSource§impl SubAssign<f64> for Number
impl SubAssign<f64> for Number
Source§fn sub_assign(&mut self, other: f64)
fn sub_assign(&mut self, other: f64)
Performs the
-=
operation. Read moreSource§impl SubAssign<i16> for Number
impl SubAssign<i16> for Number
Source§fn sub_assign(&mut self, other: i16)
fn sub_assign(&mut self, other: i16)
Performs the
-=
operation. Read moreSource§impl SubAssign<i32> for Number
impl SubAssign<i32> for Number
Source§fn sub_assign(&mut self, other: i32)
fn sub_assign(&mut self, other: i32)
Performs the
-=
operation. Read moreSource§impl SubAssign<i64> for Number
impl SubAssign<i64> for Number
Source§fn sub_assign(&mut self, other: i64)
fn sub_assign(&mut self, other: i64)
Performs the
-=
operation. Read moreSource§impl SubAssign<i8> for Number
impl SubAssign<i8> for Number
Source§fn sub_assign(&mut self, other: i8)
fn sub_assign(&mut self, other: i8)
Performs the
-=
operation. Read moreSource§impl SubAssign<u16> for Number
impl SubAssign<u16> for Number
Source§fn sub_assign(&mut self, other: u16)
fn sub_assign(&mut self, other: u16)
Performs the
-=
operation. Read moreSource§impl SubAssign<u32> for Number
impl SubAssign<u32> for Number
Source§fn sub_assign(&mut self, other: u32)
fn sub_assign(&mut self, other: u32)
Performs the
-=
operation. Read moreSource§impl SubAssign<u64> for Number
impl SubAssign<u64> for Number
Source§fn sub_assign(&mut self, other: u64)
fn sub_assign(&mut self, other: u64)
Performs the
-=
operation. Read moreSource§impl SubAssign<u8> for Number
impl SubAssign<u8> for Number
Source§fn sub_assign(&mut self, other: u8)
fn sub_assign(&mut self, other: u8)
Performs the
-=
operation. Read moreSource§impl SubAssign for Number
impl SubAssign for Number
Source§fn sub_assign(&mut self, other: Number)
fn sub_assign(&mut self, other: Number)
Performs the
-=
operation. Read moreimpl Eq for Number
impl StructuralPartialEq for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
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