pub struct RuleList<'a, R> {
pub open_curly: LeftCurly,
pub rules: Vec<'a, R>,
pub close_curly: Option<RightCurly>,
}
Expand description
A struct representing an AST node block that only accepts child “Rules”. This is defined as:
<rule-list>
│├─ "{" ─╭─ <R> ─╮─╮─ "}" ─╭──┤│
╰───────╯ ╰───────╯
This is an implementation of <at-rule-list>
or <qualified-rule-list>
.
It simply parses the open {
and iterates collecing <R>
s until the closing }
.
Every item in the list must implement the Parse, ToCursors and ToSpan traits.
Fields§
§open_curly: LeftCurly
§rules: Vec<'a, R>
§close_curly: Option<RightCurly>
Trait Implementations§
Source§impl<'a, R: Ord> Ord for RuleList<'a, R>
impl<'a, R: Ord> Ord for RuleList<'a, R>
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, R: PartialOrd> PartialOrd for RuleList<'a, R>
impl<'a, R: PartialOrd> PartialOrd for RuleList<'a, R>
Source§impl<'a, R: ToCursors> ToCursors for RuleList<'a, R>
impl<'a, R: ToCursors> ToCursors for RuleList<'a, R>
fn to_cursors(&self, s: &mut impl CursorSink)
impl<'a, R: Eq> Eq for RuleList<'a, R>
impl<'a, R> StructuralPartialEq for RuleList<'a, R>
Auto Trait Implementations§
impl<'a, R> Freeze for RuleList<'a, R>
impl<'a, R> !RefUnwindSafe for RuleList<'a, R>
impl<'a, R> !Send for RuleList<'a, R>
impl<'a, R> !Sync for RuleList<'a, R>
impl<'a, R> Unpin for RuleList<'a, R>
impl<'a, R> !UnwindSafe for RuleList<'a, R>
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