pub enum LengthPercentage {
Zero(Exact<Number, 0>),
Length(Length),
Percent(Percentage),
}Variants§
Trait Implementations§
Source§impl Clone for LengthPercentage
impl Clone for LengthPercentage
Source§fn clone(&self) -> LengthPercentage
fn clone(&self) -> LengthPercentage
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 LengthPercentage
impl Debug for LengthPercentage
Source§impl From<LengthPercentage> for Cursor
impl From<LengthPercentage> for Cursor
Source§fn from(value: LengthPercentage) -> Cursor
fn from(value: LengthPercentage) -> Cursor
Converts to this type from the input type.
Source§impl From<LengthPercentage> for Token
impl From<LengthPercentage> for Token
Source§fn from(value: LengthPercentage) -> Token
fn from(value: LengthPercentage) -> Token
Converts to this type from the input type.
Source§impl From<LengthPercentage> for f32
impl From<LengthPercentage> for f32
Source§fn from(val: LengthPercentage) -> Self
fn from(val: LengthPercentage) -> Self
Converts to this type from the input type.
Source§impl Hash for LengthPercentage
impl Hash for LengthPercentage
Source§impl NodeWithMetadata<CssMetadata> for LengthPercentage
impl NodeWithMetadata<CssMetadata> for LengthPercentage
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 LengthPercentage
impl Ord for LengthPercentage
Source§fn cmp(&self, other: &LengthPercentage) -> Ordering
fn cmp(&self, other: &LengthPercentage) -> 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 LengthPercentage
impl<'a> Parse<'a> for LengthPercentage
Source§impl PartialEq for LengthPercentage
impl PartialEq for LengthPercentage
Source§impl PartialOrd for LengthPercentage
impl PartialOrd for LengthPercentage
Source§impl<'a> Peek<'a> for LengthPercentage
impl<'a> Peek<'a> for LengthPercentage
Source§impl SemanticEq for LengthPercentage
impl SemanticEq for LengthPercentage
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 LengthPercentage
impl ToCursors for LengthPercentage
fn to_cursors(&self, s: &mut impl CursorSink)
Source§impl ToNumberValue for LengthPercentage
impl ToNumberValue for LengthPercentage
fn to_number_value(&self) -> Option<f32>
fn to_int_value(&self) -> Option<i32>
impl Copy for LengthPercentage
impl Eq for LengthPercentage
impl StructuralPartialEq for LengthPercentage
Auto Trait Implementations§
impl Freeze for LengthPercentage
impl RefUnwindSafe for LengthPercentage
impl Send for LengthPercentage
impl Sync for LengthPercentage
impl Unpin for LengthPercentage
impl UnwindSafe for LengthPercentage
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