Enum Number

Source
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§

Source§

impl Number

Source

pub fn sin<T: From<f64>>(self) -> T

Computes the sine of a number (in radians).

Source

pub fn cos<T: From<f64>>(self) -> T

Computes the cosine of a number (in radians).

Source

pub fn tan<T: From<f64>>(self) -> T

Computes the tangent of a number (in radians).

Source

pub fn asin<T: From<f64>>(self) -> T

Computes the arcsine of a number.

Source

pub fn acos<T: From<f64>>(self) -> T

Computes the arccosine of a number.

Source

pub fn atan<T: From<f64>>(self) -> T

Computes the arctangent of a number.

Source

pub fn sinh<T: From<f64>>(self) -> T

Computes the hyperbolic sine.

Source

pub fn cosh<T: From<f64>>(self) -> T

Computes the hyperbolic cosine.

Source

pub fn tanh<T: From<f64>>(self) -> T

Computes the hyperbolic tangent.

Source

pub fn asinh<T: From<f64>>(self) -> T

Computes the inverse hyperbolic sine.

Source

pub fn acosh<T: From<f64>>(self) -> T

Computes the inverse hyperbolic cosine.

Source

pub fn atanh<T: From<f64>>(self) -> T

Computes the inverse hyperbolic tangent.

Trait Implementations§

Source§

impl Add<f32> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: f32) -> Self

Performs the + operation. Read more
Source§

impl Add<f64> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: f64) -> Self

Performs the + operation. Read more
Source§

impl Add<i16> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: i16) -> Self

Performs the + operation. Read more
Source§

impl Add<i32> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: i32) -> Self

Performs the + operation. Read more
Source§

impl Add<i64> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: i64) -> Self

Performs the + operation. Read more
Source§

impl Add<i8> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: i8) -> Self

Performs the + operation. Read more
Source§

impl Add<u16> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: u16) -> Self

Performs the + operation. Read more
Source§

impl Add<u32> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: u32) -> Self

Performs the + operation. Read more
Source§

impl Add<u64> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: u64) -> Self

Performs the + operation. Read more
Source§

impl Add<u8> for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: u8) -> Self

Performs the + operation. Read more
Source§

impl Add for Number

Source§

type Output = Number

The resulting type after applying the + operator.
Source§

fn add(self, other: Number) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<f32> for Number

Source§

fn add_assign(&mut self, other: f32)

Performs the += operation. Read more
Source§

impl AddAssign<f64> for Number

Source§

fn add_assign(&mut self, other: f64)

Performs the += operation. Read more
Source§

impl AddAssign<i16> for Number

Source§

fn add_assign(&mut self, other: i16)

Performs the += operation. Read more
Source§

impl AddAssign<i32> for Number

Source§

fn add_assign(&mut self, other: i32)

Performs the += operation. Read more
Source§

impl AddAssign<i64> for Number

Source§

fn add_assign(&mut self, other: i64)

Performs the += operation. Read more
Source§

impl AddAssign<i8> for Number

Source§

fn add_assign(&mut self, other: i8)

Performs the += operation. Read more
Source§

impl AddAssign<u16> for Number

Source§

fn add_assign(&mut self, other: u16)

Performs the += operation. Read more
Source§

impl AddAssign<u32> for Number

Source§

fn add_assign(&mut self, other: u32)

Performs the += operation. Read more
Source§

impl AddAssign<u64> for Number

Source§

fn add_assign(&mut self, other: u64)

Performs the += operation. Read more
Source§

impl AddAssign<u8> for Number

Source§

fn add_assign(&mut self, other: u8)

Performs the += operation. Read more
Source§

impl AddAssign for Number

Source§

fn add_assign(&mut self, other: Number)

Performs the += operation. Read more
Source§

impl Clone for Number

Source§

fn clone(&self) -> Number

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Number

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Number

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<f32> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: f32) -> Self

Performs the / operation. Read more
Source§

impl Div<f64> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Self

Performs the / operation. Read more
Source§

impl Div<i16> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: i16) -> Self

Performs the / operation. Read more
Source§

impl Div<i32> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Self

Performs the / operation. Read more
Source§

impl Div<i64> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Self

Performs the / operation. Read more
Source§

impl Div<i8> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: i8) -> Self

Performs the / operation. Read more
Source§

impl Div<u16> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> Self

Performs the / operation. Read more
Source§

impl Div<u32> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: u32) -> Self

Performs the / operation. Read more
Source§

impl Div<u64> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: u64) -> Self

Performs the / operation. Read more
Source§

impl Div<u8> for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: u8) -> Self

Performs the / operation. Read more
Source§

impl Div for Number

Source§

type Output = Number

The resulting type after applying the / operator.
Source§

fn div(self, other: Number) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<f32> for Number

Source§

fn div_assign(&mut self, other: f32)

Performs the /= operation. Read more
Source§

impl DivAssign<f64> for Number

Source§

fn div_assign(&mut self, other: f64)

Performs the /= operation. Read more
Source§

impl DivAssign<i16> for Number

Source§

fn div_assign(&mut self, other: i16)

Performs the /= operation. Read more
Source§

impl DivAssign<i32> for Number

Source§

fn div_assign(&mut self, other: i32)

Performs the /= operation. Read more
Source§

impl DivAssign<i64> for Number

Source§

fn div_assign(&mut self, other: i64)

Performs the /= operation. Read more
Source§

impl DivAssign<i8> for Number

Source§

fn div_assign(&mut self, other: i8)

Performs the /= operation. Read more
Source§

impl DivAssign<u16> for Number

Source§

fn div_assign(&mut self, other: u16)

Performs the /= operation. Read more
Source§

impl DivAssign<u32> for Number

Source§

fn div_assign(&mut self, other: u32)

Performs the /= operation. Read more
Source§

impl DivAssign<u64> for Number

Source§

fn div_assign(&mut self, other: u64)

Performs the /= operation. Read more
Source§

impl DivAssign<u8> for Number

Source§

fn div_assign(&mut self, other: u8)

Performs the /= operation. Read more
Source§

impl DivAssign for Number

Source§

fn div_assign(&mut self, other: Number)

Performs the /= operation. Read more
Source§

impl From<GenericFraction<u32>> for Number

Source§

fn from(value: GenericFraction<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<Number> for f64

Source§

fn from(value: Number) -> Self

Converts to this type from the input type.
Source§

impl From<StandardForm> for Number

Source§

fn from(value: StandardForm) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Number

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl Mul<f32> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> Self

Performs the * operation. Read more
Source§

impl Mul<f64> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Self

Performs the * operation. Read more
Source§

impl Mul<i16> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> Self

Performs the * operation. Read more
Source§

impl Mul<i32> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Self

Performs the * operation. Read more
Source§

impl Mul<i64> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Self

Performs the * operation. Read more
Source§

impl Mul<i8> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> Self

Performs the * operation. Read more
Source§

impl Mul<u16> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> Self

Performs the * operation. Read more
Source§

impl Mul<u32> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> Self

Performs the * operation. Read more
Source§

impl Mul<u64> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> Self

Performs the * operation. Read more
Source§

impl Mul<u8> for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> Self

Performs the * operation. Read more
Source§

impl Mul for Number

Source§

type Output = Number

The resulting type after applying the * operator.
Source§

fn mul(self, other: Number) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<f32> for Number

Source§

fn mul_assign(&mut self, other: f32)

Performs the *= operation. Read more
Source§

impl MulAssign<f64> for Number

Source§

fn mul_assign(&mut self, other: f64)

Performs the *= operation. Read more
Source§

impl MulAssign<i16> for Number

Source§

fn mul_assign(&mut self, other: i16)

Performs the *= operation. Read more
Source§

impl MulAssign<i32> for Number

Source§

fn mul_assign(&mut self, other: i32)

Performs the *= operation. Read more
Source§

impl MulAssign<i64> for Number

Source§

fn mul_assign(&mut self, other: i64)

Performs the *= operation. Read more
Source§

impl MulAssign<i8> for Number

Source§

fn mul_assign(&mut self, other: i8)

Performs the *= operation. Read more
Source§

impl MulAssign<u16> for Number

Source§

fn mul_assign(&mut self, other: u16)

Performs the *= operation. Read more
Source§

impl MulAssign<u32> for Number

Source§

fn mul_assign(&mut self, other: u32)

Performs the *= operation. Read more
Source§

impl MulAssign<u64> for Number

Source§

fn mul_assign(&mut self, other: u64)

Performs the *= operation. Read more
Source§

impl MulAssign<u8> for Number

Source§

fn mul_assign(&mut self, other: u8)

Performs the *= operation. Read more
Source§

impl MulAssign for Number

Source§

fn mul_assign(&mut self, other: Number)

Performs the *= operation. Read more
Source§

impl Neg for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Ord for Number

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<f32> for Number

Source§

fn eq(&self, other: &f32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<f64> for Number

Source§

fn eq(&self, other: &f64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i16> for Number

Source§

fn eq(&self, other: &i16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i32> for Number

Source§

fn eq(&self, other: &i32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i64> for Number

Source§

fn eq(&self, other: &i64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<i8> for Number

Source§

fn eq(&self, other: &i8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u16> for Number

Source§

fn eq(&self, other: &u16) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u32> for Number

Source§

fn eq(&self, other: &u32) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u64> for Number

Source§

fn eq(&self, other: &u64) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u8> for Number

Source§

fn eq(&self, other: &u8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Number

Source§

fn eq(&self, other: &Number) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd<f32> for Number

Source§

fn partial_cmp(&self, other: &f32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<f64> for Number

Source§

fn partial_cmp(&self, other: &f64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<i16> for Number

Source§

fn partial_cmp(&self, other: &i16) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<i32> for Number

Source§

fn partial_cmp(&self, other: &i32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<i64> for Number

Source§

fn partial_cmp(&self, other: &i64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<i8> for Number

Source§

fn partial_cmp(&self, other: &i8) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<u16> for Number

Source§

fn partial_cmp(&self, other: &u16) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<u32> for Number

Source§

fn partial_cmp(&self, other: &u32) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<u64> for Number

Source§

fn partial_cmp(&self, other: &u64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd<u8> for Number

Source§

fn partial_cmp(&self, other: &u8) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl PartialOrd for Number

Source§

fn partial_cmp(&self, other: &Number) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem<f32> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: f32) -> Self

Performs the % operation. Read more
Source§

impl Rem<f64> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: f64) -> Self

Performs the % operation. Read more
Source§

impl Rem<i16> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: i16) -> Self

Performs the % operation. Read more
Source§

impl Rem<i32> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> Self

Performs the % operation. Read more
Source§

impl Rem<i64> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: i64) -> Self

Performs the % operation. Read more
Source§

impl Rem<i8> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: i8) -> Self

Performs the % operation. Read more
Source§

impl Rem<u16> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: u16) -> Self

Performs the % operation. Read more
Source§

impl Rem<u32> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: u32) -> Self

Performs the % operation. Read more
Source§

impl Rem<u64> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: u64) -> Self

Performs the % operation. Read more
Source§

impl Rem<u8> for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: u8) -> Self

Performs the % operation. Read more
Source§

impl Rem for Number

Source§

type Output = Number

The resulting type after applying the % operator.
Source§

fn rem(self, other: Number) -> Self::Output

Performs the % operation. Read more
Source§

impl RemAssign<f32> for Number

Source§

fn rem_assign(&mut self, other: f32)

Performs the %= operation. Read more
Source§

impl RemAssign<f64> for Number

Source§

fn rem_assign(&mut self, other: f64)

Performs the %= operation. Read more
Source§

impl RemAssign<i16> for Number

Source§

fn rem_assign(&mut self, other: i16)

Performs the %= operation. Read more
Source§

impl RemAssign<i32> for Number

Source§

fn rem_assign(&mut self, other: i32)

Performs the %= operation. Read more
Source§

impl RemAssign<i64> for Number

Source§

fn rem_assign(&mut self, other: i64)

Performs the %= operation. Read more
Source§

impl RemAssign<i8> for Number

Source§

fn rem_assign(&mut self, other: i8)

Performs the %= operation. Read more
Source§

impl RemAssign<u16> for Number

Source§

fn rem_assign(&mut self, other: u16)

Performs the %= operation. Read more
Source§

impl RemAssign<u32> for Number

Source§

fn rem_assign(&mut self, other: u32)

Performs the %= operation. Read more
Source§

impl RemAssign<u64> for Number

Source§

fn rem_assign(&mut self, other: u64)

Performs the %= operation. Read more
Source§

impl RemAssign<u8> for Number

Source§

fn rem_assign(&mut self, other: u8)

Performs the %= operation. Read more
Source§

impl RemAssign for Number

Source§

fn rem_assign(&mut self, other: Number)

Performs the %= operation. Read more
Source§

impl Sub<f32> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: f32) -> Self

Performs the - operation. Read more
Source§

impl Sub<f64> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: f64) -> Self

Performs the - operation. Read more
Source§

impl Sub<i16> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: i16) -> Self

Performs the - operation. Read more
Source§

impl Sub<i32> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> Self

Performs the - operation. Read more
Source§

impl Sub<i64> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> Self

Performs the - operation. Read more
Source§

impl Sub<i8> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: i8) -> Self

Performs the - operation. Read more
Source§

impl Sub<u16> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> Self

Performs the - operation. Read more
Source§

impl Sub<u32> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: u32) -> Self

Performs the - operation. Read more
Source§

impl Sub<u64> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: u64) -> Self

Performs the - operation. Read more
Source§

impl Sub<u8> for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: u8) -> Self

Performs the - operation. Read more
Source§

impl Sub for Number

Source§

type Output = Number

The resulting type after applying the - operator.
Source§

fn sub(self, other: Number) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign<f32> for Number

Source§

fn sub_assign(&mut self, other: f32)

Performs the -= operation. Read more
Source§

impl SubAssign<f64> for Number

Source§

fn sub_assign(&mut self, other: f64)

Performs the -= operation. Read more
Source§

impl SubAssign<i16> for Number

Source§

fn sub_assign(&mut self, other: i16)

Performs the -= operation. Read more
Source§

impl SubAssign<i32> for Number

Source§

fn sub_assign(&mut self, other: i32)

Performs the -= operation. Read more
Source§

impl SubAssign<i64> for Number

Source§

fn sub_assign(&mut self, other: i64)

Performs the -= operation. Read more
Source§

impl SubAssign<i8> for Number

Source§

fn sub_assign(&mut self, other: i8)

Performs the -= operation. Read more
Source§

impl SubAssign<u16> for Number

Source§

fn sub_assign(&mut self, other: u16)

Performs the -= operation. Read more
Source§

impl SubAssign<u32> for Number

Source§

fn sub_assign(&mut self, other: u32)

Performs the -= operation. Read more
Source§

impl SubAssign<u64> for Number

Source§

fn sub_assign(&mut self, other: u64)

Performs the -= operation. Read more
Source§

impl SubAssign<u8> for Number

Source§

fn sub_assign(&mut self, other: u8)

Performs the -= operation. Read more
Source§

impl SubAssign for Number

Source§

fn sub_assign(&mut self, other: Number)

Performs the -= operation. Read more
Source§

impl TryFrom<&str> for Number

Source§

type Error = ParsingNumberError

The type returned in the event of a conversion error.
Source§

fn try_from(value: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for Number

Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,