pub struct DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a>,{
pub open_curly: LeftCurly,
pub declarations: Vec<'a, Declaration<'a, D>>,
pub at_rules: Vec<'a, R>,
pub close_curly: Option<RightCurly>,
}Expand description
A generic struct for AST nodes representing a rule’s block that is only capable of having child declarations or at-rules. Qualified Rules are not allowed. This is defined as:
<declaration-rule-list>
│├─ "{" ─╮─╭─╮─ <declaration <D>> ─╮─╭─╮─ "}" ─╭─┤│
│ │ │ │ │ ╰───────╯
│ │ ╰─ <R> ───────────────┤ │
│ ╰───────────────────────╯ │
╰───────────────────────────╯<D> must implement the Declaration trait.
<R> should be an At-Rule. <R> is only parsed if an AtKeyword can be peeked.
It is an implementation of “declaration-rule-list”. It includes an error tolerance in that the ending }
token can be omitted, if at the end of the file.
Fields§
§open_curly: LeftCurly§declarations: Vec<'a, Declaration<'a, D>>§at_rules: Vec<'a, R>§close_curly: Option<RightCurly>Trait Implementations§
Source§impl<'a, D, R: Clone> Clone for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Clone,
impl<'a, D, R: Clone> Clone for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Clone,
Source§fn clone(&self) -> DeclarationRuleList<'a, D, R>
fn clone(&self) -> DeclarationRuleList<'a, D, R>
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<'a, D, R: Debug> Debug for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Debug,
impl<'a, D, R: Debug> Debug for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Debug,
Source§impl<'a, D, R: Hash> Hash for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Hash,
impl<'a, D, R: Hash> Hash for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Hash,
Source§impl<'a, D, R: Ord> Ord for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Ord,
impl<'a, D, R: Ord> Ord for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Ord,
Source§fn cmp(&self, other: &DeclarationRuleList<'a, D, R>) -> Ordering
fn cmp(&self, other: &DeclarationRuleList<'a, D, R>) -> 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, D, R> Parse<'a> for DeclarationRuleList<'a, D, R>
impl<'a, D, R> Parse<'a> for DeclarationRuleList<'a, D, R>
Source§impl<'a, D, R: PartialEq> PartialEq for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + PartialEq,
impl<'a, D, R: PartialEq> PartialEq for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + PartialEq,
Source§fn eq(&self, other: &DeclarationRuleList<'a, D, R>) -> bool
fn eq(&self, other: &DeclarationRuleList<'a, D, R>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a, D, R: PartialOrd> PartialOrd for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + PartialOrd,
impl<'a, D, R: PartialOrd> PartialOrd for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + PartialOrd,
Source§impl<'a, D, R> Peek<'a> for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a>,
impl<'a, D, R> Peek<'a> for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a>,
Source§impl<'a, D, R> ToCursors for DeclarationRuleList<'a, D, R>
impl<'a, D, R> ToCursors for DeclarationRuleList<'a, D, R>
fn to_cursors(&self, s: &mut impl CursorSink)
Source§impl<'a, D, R> ToSpan for DeclarationRuleList<'a, D, R>
impl<'a, D, R> ToSpan for DeclarationRuleList<'a, D, R>
impl<'a, D, R: Eq> Eq for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a> + Eq,
impl<'a, D, R> StructuralPartialEq for DeclarationRuleList<'a, D, R>where
D: DeclarationValue<'a>,
Auto Trait Implementations§
impl<'a, D, R> Freeze for DeclarationRuleList<'a, D, R>
impl<'a, D, R> !RefUnwindSafe for DeclarationRuleList<'a, D, R>
impl<'a, D, R> !Send for DeclarationRuleList<'a, D, R>
impl<'a, D, R> !Sync for DeclarationRuleList<'a, D, R>
impl<'a, D, R> Unpin for DeclarationRuleList<'a, D, R>
impl<'a, D, R> !UnwindSafe for DeclarationRuleList<'a, D, 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