pub enum Component<'a> {
Show 14 variants
Keyword(&'static str),
Ident(Cow<'a, str>),
Number {
value: f64,
integer: bool,
},
Percentage(f64),
Dimension(f64, Unit),
Math(Math),
Color(Color),
String(Cow<'a, str>),
Url(Cow<'a, str>),
Literal(char),
Function {
name: &'static str,
arguments: Vec<Component<'a>>,
},
Block(Vec<Component<'a>>),
Parens(Vec<Component<'a>>),
Tokens(Vec<ComponentValue<'a>>),
}Expand description
One typed value in a property’s value.
Variants§
Keyword(&'static str)
A keyword from the grammar, in lowercase.
Ident(Cow<'a, str>)
An identifier the grammar leaves open, as written: <custom-ident>.
Number
Percentage(f64)
Dimension(f64, Unit)
Math(Math)
Color(Color)
String(Cow<'a, str>)
Url(Cow<'a, str>)
Literal(char)
,, / and the like, where the grammar has them.
Function
Block(Vec<Component<'a>>)
[ … ], as grid line names are written.
Parens(Vec<Component<'a>>)
( … ).
Tokens(Vec<ComponentValue<'a>>)
<declaration-value>: tokens the grammar takes as they are.
Trait Implementations§
impl<'a> StructuralPartialEq for Component<'a>
Auto Trait Implementations§
impl<'a> Forget for Component<'a>
impl<'a> Freeze for Component<'a>
impl<'a> Move for Component<'a>
impl<'a> RefUnwindSafe for Component<'a>
impl<'a> Send for Component<'a>
impl<'a> Sync for Component<'a>
impl<'a> Unpin for Component<'a>
impl<'a> UnsafeUnpin for Component<'a>
impl<'a> UnwindSafe for Component<'a>
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