pub trait StyleSheet<'a, M: NodeMetadata>: Sized + Parse<'a> {
    type Rule: Parse<'a> + NodeWithMetadata<M>;
    // Provided method
    fn parse_stylesheet<I>(
        p: &mut Parser<'a, I>,
    ) -> Result<(Vec<'a, Self::Rule>, M)>
       where I: Iterator<Item = Cursor> + Clone { ... }
}Expand description
This trait provides an implementation for parsing a StyleSheet.
It does not implement Parse, but provides parse_stylesheet(&mut Parser<'a>) -> Result<...>, which can make
for a trivial Parse implementation. The type StyleSheet::Rule must be defined, and represents any Rule allowed
in a style sheet, which is the only top level item of the stylesheet.
StyleSheets are special in that they must discard CdcOrCdo tokens.
The steps parse_stylesheet takes can be defined as:
<style-sheet>
 │├─╮─╭─ <ws*> ─╮─╭╮─╭─ <cdcorcdo-token> ─╮─╭─ <rule> ──┤│
    │ ╰─────────╯ ││ ╰────────────────────╯ │
    ╰─────────────╯╰────────────────────────╯Required Associated Types§
type Rule: Parse<'a> + NodeWithMetadata<M>
Provided Methods§
fn parse_stylesheet<I>( p: &mut Parser<'a, I>, ) -> Result<(Vec<'a, Self::Rule>, M)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.