#[repr(C)]pub enum MathValue {
Sum(MathSum),
Product(MathProduct),
Negate(MathNegate),
Invert(MathInvert),
Min(MathMin),
Max(MathMax),
Clamp(MathClamp),
}Expand description
A math expression used by the Typed OM.
This corresponds to CSSMathValue and its subclasses in the Typed OM
specification.
Variants§
Sum(MathSum)
A sum of numeric values.
This corresponds to CSSMathSum.
Product(MathProduct)
A product of numeric values.
This corresponds to CSSMathProduct.
Negate(MathNegate)
A negated numeric value.
This corresponds to CSSMathNegate.
Invert(MathInvert)
An inverted numeric value.
This corresponds to CSSMathInvert.
Min(MathMin)
A minimum expression over numeric values.
This corresponds to CSSMathMin.
Max(MathMax)
A maximum expression over numeric values.
This corresponds to CSSMathMax.
Clamp(MathClamp)
A clamp expression over numeric values.
This corresponds to CSSMathClamp.
Implementations§
Source§impl MathValue
impl MathValue
Sourcepub fn numeric_type(&self) -> Option<&NumericType>
pub fn numeric_type(&self) -> Option<&NumericType>
Returns the numeric type associated with this math value, if available.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MathValue
impl RefUnwindSafe for MathValue
impl Send for MathValue
impl Sync for MathValue
impl Unpin for MathValue
impl UnsafeUnpin for MathValue
impl UnwindSafe for MathValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert