pub enum NumberLength {
Number(Number),
Length(Length),
}Variants§
Trait Implementations§
Source§impl Clone for NumberLength
impl Clone for NumberLength
Source§fn clone(&self) -> NumberLength
fn clone(&self) -> NumberLength
Returns a duplicate 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 NumberLength
impl Debug for NumberLength
Source§impl From<NumberLength> for Cursor
impl From<NumberLength> for Cursor
Source§fn from(value: NumberLength) -> Cursor
fn from(value: NumberLength) -> Cursor
Converts to this type from the input type.
Source§impl From<NumberLength> for Token
impl From<NumberLength> for Token
Source§fn from(value: NumberLength) -> Token
fn from(value: NumberLength) -> Token
Converts to this type from the input type.
Source§impl From<NumberLength> for f32
impl From<NumberLength> for f32
Source§fn from(val: NumberLength) -> Self
fn from(val: NumberLength) -> Self
Converts to this type from the input type.
Source§impl Hash for NumberLength
impl Hash for NumberLength
Source§impl NodeWithMetadata<CssMetadata> for NumberLength
impl NodeWithMetadata<CssMetadata> for NumberLength
Source§fn self_metadata(&self) -> CssMetadata
fn self_metadata(&self) -> CssMetadata
Returns the metadata contributed by this node itself, not including children.
Most nodes don’t contribute metadata, so can simply return
M::default().
Nodes like StyleRule or AtRules should return their own node kind flags here.Source§fn metadata(&self) -> CssMetadata
fn metadata(&self) -> CssMetadata
Returns the complete aggregated metadata for this node (self + children).
Default implementation merges children’s metadata with self_metadata().
Source§impl Ord for NumberLength
impl Ord for NumberLength
Source§fn cmp(&self, other: &NumberLength) -> Ordering
fn cmp(&self, other: &NumberLength) -> 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<'a> Parse<'a> for NumberLength
impl<'a> Parse<'a> for NumberLength
Source§impl PartialEq for NumberLength
impl PartialEq for NumberLength
Source§impl PartialOrd for NumberLength
impl PartialOrd for NumberLength
Source§impl<'a> Peek<'a> for NumberLength
impl<'a> Peek<'a> for NumberLength
Source§impl SemanticEq for NumberLength
impl SemanticEq for NumberLength
Source§fn semantic_eq(&self, other: &Self) -> bool
fn semantic_eq(&self, other: &Self) -> bool
Returns
true if self and other are semantically equal.Source§impl ToCursors for NumberLength
impl ToCursors for NumberLength
fn to_cursors(&self, s: &mut impl CursorSink)
Source§impl ToNumberValue for NumberLength
impl ToNumberValue for NumberLength
fn to_number_value(&self) -> Option<f32>
fn to_int_value(&self) -> Option<i32>
impl Copy for NumberLength
impl Eq for NumberLength
impl StructuralPartialEq for NumberLength
Auto Trait Implementations§
impl Freeze for NumberLength
impl RefUnwindSafe for NumberLength
impl Send for NumberLength
impl Sync for NumberLength
impl Unpin for NumberLength
impl UnwindSafe for NumberLength
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