Enum parcel_css::values::calc::MathFunction
source · [−]pub enum MathFunction<V> {
Calc(Calc<V>),
Min(Vec<Calc<V>>),
Max(Vec<Calc<V>>),
Clamp(Calc<V>, Calc<V>, Calc<V>),
Round(RoundingStrategy, Calc<V>, Calc<V>),
Rem(Calc<V>, Calc<V>),
Mod(Calc<V>, Calc<V>),
Abs(Calc<V>),
Sign(Calc<V>),
Hypot(Vec<Calc<V>>),
}
Expand description
A CSS math function.
Math functions may be used in most properties and values that accept numeric values, including lengths, percentages, angles, times, etc.
Variants
Calc(Calc<V>)
The calc()
function.
Min(Vec<Calc<V>>)
The min()
function.
Max(Vec<Calc<V>>)
The max()
function.
Clamp(Calc<V>, Calc<V>, Calc<V>)
The clamp()
function.
Round(RoundingStrategy, Calc<V>, Calc<V>)
The round()
function.
Rem(Calc<V>, Calc<V>)
The rem()
function.
Mod(Calc<V>, Calc<V>)
The mod()
function.
Abs(Calc<V>)
The abs()
function.
Sign(Calc<V>)
The sign()
function.
Hypot(Vec<Calc<V>>)
The hypot()
function.
Trait Implementations
sourceimpl<V: Clone> Clone for MathFunction<V>
impl<V: Clone> Clone for MathFunction<V>
sourcefn clone(&self) -> MathFunction<V>
fn clone(&self) -> MathFunction<V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<V: Debug> Debug for MathFunction<V>
impl<V: Debug> Debug for MathFunction<V>
sourceimpl<V: PartialEq> PartialEq<MathFunction<V>> for MathFunction<V>
impl<V: PartialEq> PartialEq<MathFunction<V>> for MathFunction<V>
sourcefn eq(&self, other: &MathFunction<V>) -> bool
fn eq(&self, other: &MathFunction<V>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MathFunction<V>) -> bool
fn ne(&self, other: &MathFunction<V>) -> bool
This method tests for !=
.
sourceimpl<V: ToCss + Mul<f32, Output = V> + TrySign + Clone + Debug> ToCss for MathFunction<V>
impl<V: ToCss + Mul<f32, Output = V> + TrySign + Clone + Debug> ToCss for MathFunction<V>
sourcefn to_css<W>(
&self,
dest: &mut Printer<'_, '_, '_, W>
) -> Result<(), PrinterError> where
W: Write,
fn to_css<W>(
&self,
dest: &mut Printer<'_, '_, '_, W>
) -> Result<(), PrinterError> where
W: Write,
Serialize self
in CSS syntax, writing to dest
.
sourcefn to_css_string(
&self,
options: PrinterOptions<'_>
) -> Result<String, PrinterError>
fn to_css_string(
&self,
options: PrinterOptions<'_>
) -> Result<String, PrinterError>
Serialize self
in CSS syntax and return a string. Read more
impl<V> StructuralPartialEq for MathFunction<V>
Auto Trait Implementations
impl<V> RefUnwindSafe for MathFunction<V> where
V: RefUnwindSafe,
impl<V> Send for MathFunction<V> where
V: Send,
impl<V> Sync for MathFunction<V> where
V: Sync,
impl<V> Unpin for MathFunction<V>
impl<V> UnwindSafe for MathFunction<V> where
V: UnwindSafe,
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer