Enum rsass::value::CssDimension
source · pub enum CssDimension {
Length,
Angle,
Time,
Frequency,
Resolution,
None,
Unknown(String),
}
Expand description
Dimension of a unit.
Units of the same dimension can be converted to each other. There is a single “length” dimension, since all lengths can be converted to each other in the browser, where all are converted to device pixels anyway.
This type is for compatibility in css functions.
See also Dimension
.
Variants§
Length
A length of any kind.
Angle
An angle.
Time
A duration.
Frequency
A frequency.
Resolution
A resolution (number of pixels per length).
None
No dimension (no unit, percentage, or grid fraction).
Unknown(String)
The dimension of an unknown (but named) unit.
Trait Implementations§
source§impl Clone for CssDimension
impl Clone for CssDimension
source§fn clone(&self) -> CssDimension
fn clone(&self) -> CssDimension
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CssDimension
impl Debug for CssDimension
source§impl From<Dimension> for CssDimension
impl From<Dimension> for CssDimension
source§impl Ord for CssDimension
impl Ord for CssDimension
source§fn cmp(&self, other: &CssDimension) -> Ordering
fn cmp(&self, other: &CssDimension) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CssDimension
impl PartialEq for CssDimension
source§fn eq(&self, other: &CssDimension) -> bool
fn eq(&self, other: &CssDimension) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CssDimension
impl PartialOrd for CssDimension
source§fn partial_cmp(&self, other: &CssDimension) -> Option<Ordering>
fn partial_cmp(&self, other: &CssDimension) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for CssDimension
impl StructuralPartialEq for CssDimension
Auto Trait Implementations§
impl Freeze for CssDimension
impl RefUnwindSafe for CssDimension
impl Send for CssDimension
impl Sync for CssDimension
impl Unpin for CssDimension
impl UnwindSafe for CssDimension
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