pub enum MathFunction {
Show 21 variants
Calc,
Min,
Max,
Clamp,
Round,
Mod,
Rem,
Sin,
Cos,
Tan,
Asin,
Acos,
Atan,
Atan2,
Pow,
Sqrt,
Hypot,
Log,
Exp,
Abs,
Sign,
}
Expand description
The name of the mathematical function that we’re parsing.
Variants§
Calc
calc()
: https://drafts.csswg.org/css-values-4/#funcdef-calc
Min
min()
: https://drafts.csswg.org/css-values-4/#funcdef-min
Max
max()
: https://drafts.csswg.org/css-values-4/#funcdef-max
Clamp
clamp()
: https://drafts.csswg.org/css-values-4/#funcdef-clamp
Round
round()
: https://drafts.csswg.org/css-values-4/#funcdef-round
Mod
mod()
: https://drafts.csswg.org/css-values-4/#funcdef-mod
Rem
rem()
: https://drafts.csswg.org/css-values-4/#funcdef-rem
Sin
sin()
: https://drafts.csswg.org/css-values-4/#funcdef-sin
Cos
cos()
: https://drafts.csswg.org/css-values-4/#funcdef-cos
Tan
tan()
: https://drafts.csswg.org/css-values-4/#funcdef-tan
Asin
asin()
: https://drafts.csswg.org/css-values-4/#funcdef-asin
Acos
acos()
: https://drafts.csswg.org/css-values-4/#funcdef-acos
Atan
atan()
: https://drafts.csswg.org/css-values-4/#funcdef-atan
Atan2
atan2()
: https://drafts.csswg.org/css-values-4/#funcdef-atan2
Pow
pow()
: https://drafts.csswg.org/css-values-4/#funcdef-pow
Sqrt
sqrt()
: https://drafts.csswg.org/css-values-4/#funcdef-sqrt
Hypot
hypot()
: https://drafts.csswg.org/css-values-4/#funcdef-hypot
Log
log()
: https://drafts.csswg.org/css-values-4/#funcdef-log
Exp
exp()
: https://drafts.csswg.org/css-values-4/#funcdef-exp
Abs
abs()
: https://drafts.csswg.org/css-values-4/#funcdef-abs
Sign
sign()
: https://drafts.csswg.org/css-values-4/#funcdef-sign
Implementations§
source§impl MathFunction
impl MathFunction
sourcepub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
Parse this keyword.
sourcepub fn from_ident(ident: &str) -> Result<Self, ()>
pub fn from_ident(ident: &str) -> Result<Self, ()>
Parse this keyword from a string slice.
Trait Implementations§
source§impl Clone for MathFunction
impl Clone for MathFunction
source§fn clone(&self) -> MathFunction
fn clone(&self) -> MathFunction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MathFunction
impl Debug for MathFunction
source§impl Parse for MathFunction
impl Parse for MathFunction
source§fn parse<'i, 't>(
_: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( _: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
impl Copy for MathFunction
Auto Trait Implementations§
impl Freeze for MathFunction
impl RefUnwindSafe for MathFunction
impl Send for MathFunction
impl Sync for MathFunction
impl Unpin for MathFunction
impl UnwindSafe for MathFunction
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
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>
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>
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 more