Struct rsass::Number [−][src]
Fields
value: Rational
plus_sign: bool
lead_zero: bool
Methods
impl Number
[src]
impl Number
pub fn new(value: Rational) -> Self
[src]
pub fn new(value: Rational) -> Self
pub fn from_integer(n: isize) -> Self
[src]
pub fn from_integer(n: isize) -> Self
pub fn abs(self) -> Self
[src]
pub fn abs(self) -> Self
pub fn is_integer(&self) -> bool
[src]
pub fn is_integer(&self) -> bool
pub fn to_integer(&self) -> isize
[src]
pub fn to_integer(&self) -> isize
Trait Implementations
impl Clone for Number
[src]
impl Clone for Number
fn clone(&self) -> Number
[src]
fn clone(&self) -> Number
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Number
[src]
impl Debug for Number
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Number
[src]
impl PartialEq for Number
fn eq(&self, other: &Number) -> bool
[src]
fn eq(&self, other: &Number) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Number) -> bool
[src]
fn ne(&self, other: &Number) -> bool
This method tests for !=
.
impl Eq for Number
[src]
impl Eq for Number
impl PartialOrd for Number
[src]
impl PartialOrd for Number
fn partial_cmp(&self, other: &Number) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Number) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Number) -> bool
[src]
fn lt(&self, other: &Number) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Number) -> bool
[src]
fn le(&self, other: &Number) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Number) -> bool
[src]
fn gt(&self, other: &Number) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Number) -> bool
[src]
fn ge(&self, other: &Number) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Number
[src]
impl Ord for Number
fn cmp(&self, other: &Number) -> Ordering
[src]
fn cmp(&self, other: &Number) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Add for Number
[src]
impl Add for Number
type Output = Number
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
fn add(self, rhs: Self) -> Self::Output
Performs the +
operation.
impl<'a> Div for &'a Number
[src]
impl<'a> Div for &'a Number
type Output = Number
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output
[src]
fn div(self, rhs: Self) -> Self::Output
Performs the /
operation.
impl<'a> Mul for &'a Number
[src]
impl<'a> Mul for &'a Number
type Output = Number
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output
[src]
fn mul(self, rhs: Self) -> Self::Output
Performs the *
operation.
impl<'a> Neg for &'a Number
[src]
impl<'a> Neg for &'a Number
type Output = Number
The resulting type after applying the -
operator.
fn neg(self) -> Number
[src]
fn neg(self) -> Number
Performs the unary -
operation.
impl<'a> Sub for &'a Number
[src]
impl<'a> Sub for &'a Number
type Output = Number
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
fn sub(self, rhs: Self) -> Self::Output
Performs the -
operation.
impl Zero for Number
[src]
impl Zero for Number
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Display for Number
[src]
impl Display for Number