Enum parcel_css::values::percentage::DimensionPercentage
source · [−]pub enum DimensionPercentage<D> {
Dimension(D),
Percentage(Percentage),
Calc(Box<Calc<DimensionPercentage<D>>>),
}
Expand description
A generic type that allows any kind of dimension and percentage to be used standalone or mixed within a calc() expression. https://drafts.csswg.org/css-values-4/#mixed-percentages
Variants
Dimension(D)
Percentage(Percentage)
Calc(Box<Calc<DimensionPercentage<D>>>)
Implementations
Trait Implementations
impl<D: TryAdd<D> + Clone + PartialEq<f32> + PartialOrd<f32> + Debug> Add<DimensionPercentage<D>> for DimensionPercentage<D>
impl<D: TryAdd<D> + Clone + PartialEq<f32> + PartialOrd<f32> + Debug> Add<DimensionPercentage<D>> for DimensionPercentage<D>
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
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<D> RefUnwindSafe for DimensionPercentage<D> where
D: RefUnwindSafe,
impl<D> Send for DimensionPercentage<D> where
D: Send,
impl<D> Sync for DimensionPercentage<D> where
D: Sync,
impl<D> Unpin for DimensionPercentage<D> where
D: Unpin,
impl<D> UnwindSafe for DimensionPercentage<D> where
D: UnwindSafe,
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more