[−][src]Struct rsass::Number
The actual number part of a numeric sass or css value.
Only the actual numeric value is included, not any unit, but flags to show a leading plus sign and/or leading zero (for values between -1 and 1) is included.
Fields
value: Rational
plus_sign: bool
lead_zero: bool
Methods
impl Number
[src]
pub fn abs(self) -> Self
[src]
Computes the absolute value of the number, retaining the flags.
pub fn is_integer(&self) -> bool
[src]
Returns true if the number is an integer.
pub fn to_integer(&self) -> isize
[src]
Converts to an integer, rounding towards zero.
Trait Implementations
impl<T> From<T> for Number where
T: Into<Rational>,
[src]
T: Into<Rational>,
impl Clone for Number
[src]
impl PartialOrd<Number> for Number
[src]
fn partial_cmp(&self, other: &Number) -> Option<Ordering>
[src]
fn lt(&self, other: &Number) -> bool
[src]
fn le(&self, other: &Number) -> bool
[src]
fn gt(&self, other: &Number) -> bool
[src]
fn ge(&self, other: &Number) -> bool
[src]
impl Eq for Number
[src]
impl Ord for Number
[src]
fn cmp(&self, other: &Number) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Number> for Number
[src]
impl Debug for Number
[src]
impl Display for Number
[src]
impl<'a> Sub<&'a Number> for &'a Number
[src]
type Output = Number
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl<'a> Div<&'a Number> for &'a Number
[src]
type Output = Number
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self::Output
[src]
impl Add<Number> for Number
[src]
type Output = Number
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl<'a> Mul<&'a Number> for &'a Number
[src]
type Output = Number
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output
[src]
impl<'a> Neg for &'a Number
[src]
impl Zero for Number
[src]
Auto Trait Implementations
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
impl RefUnwindSafe for Number
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,