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>where
&'static str: Freeze,
&'a str: Freeze,
String: Freeze,
*const u8 is !null: Freeze,
PhantomData<Node>: Freeze,
*const Node is !null: Freeze,
PhantomData<Channel>: Freeze,
*const Color is !null: Freeze,
PhantomData<Color>: Freeze,
*const Relative is !null: Freeze,
PhantomData<Relative>: Freeze,
*const Mix is !null: Freeze,
PhantomData<Mix>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Component<'a>>: Freeze,
PhantomData<ComponentValue<'a>>: Freeze,
impl<'a> Move for Component<'a>
impl<'a> RefUnwindSafe for Component<'a>where
String: RefUnwindSafe,
impl<'a> Send for Component<'a>
impl<'a> Sync for Component<'a>
impl<'a> Unpin for Component<'a>
impl<'a> UnsafeUnpin for Component<'a>where
&'static str: UnsafeUnpin,
&'a str: UnsafeUnpin,
String: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Node>: UnsafeUnpin,
*const Node is !null: UnsafeUnpin,
PhantomData<Channel>: UnsafeUnpin,
*const Color is !null: UnsafeUnpin,
PhantomData<Color>: UnsafeUnpin,
*const Relative is !null: UnsafeUnpin,
PhantomData<Relative>: UnsafeUnpin,
*const Mix is !null: UnsafeUnpin,
PhantomData<Mix>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Component<'a>>: UnsafeUnpin,
PhantomData<ComponentValue<'a>>: UnsafeUnpin,
impl<'a> UnwindSafe for Component<'a>where
&'static str: UnwindSafe,
&'a str: UnwindSafe,
String: UnwindSafe,
RawVecInner: UnwindSafe,
BoxRaw<Node>: UnwindSafe,
BoxRaw<Color>: UnwindSafe,
BoxRaw<Relative>: UnwindSafe,
BoxRaw<Mix>: UnwindSafe,
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