Enum css_style::calc::Calc [−][src]
pub enum Calc {
Length(Box<Length>),
Percent(Percent),
CssVariable(String),
Sum(Box<Calc>, Box<Calc>),
Sub(Box<Calc>, Box<Calc>),
Mul(Box<Calc>, f32),
Div(Box<Calc>, f32),
}Expand description
calc css function
Note: I think current implementation doesn’t cover every use case, but good enough for most simple cases.
Variants
Length(Box<Length>)
Percent(Percent)
Tuple Fields
0: PercentCssVariable(String)
Tuple Fields
0: StringSum(Box<Calc>, Box<Calc>)
Sub(Box<Calc>, Box<Calc>)
Mul(Box<Calc>, f32)
Div(Box<Calc>, f32)
Implementations
Trait Implementations
Performs the conversion.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Calc
impl UnwindSafe for Calc
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds error is returned which contains
the unclamped color. Read more
