[][src]Trait casco::Driver

pub trait Driver<S> where
    S: TokenStream
{ type Property; type Rule; type Error; fn parse_property(
        &mut self,
        name: &[TokenTree<S>],
        value: &[TokenTree<S>]
    ) -> Result<Self::Property, Self::Error>;
fn parse_rule(
        &mut self,
        selectors: &[TokenTree<S>],
        body: &S::Group
    ) -> Result<Self::Rule, Vec<Error<Self, S>>>; }

Controls how the domain-specific parts of a style sheet are parsed.

Associated Types

type Property

Controls how property names and values are parsed.

type Rule

Controls how selectors and rule bodies are parsed.

type Error

Type of error that is returned if the name or value of a property could not be parsed successfully or if the selectors or body of a rule could not be parsed successfully.

Loading content...

Required methods

fn parse_property(
    &mut self,
    name: &[TokenTree<S>],
    value: &[TokenTree<S>]
) -> Result<Self::Property, Self::Error>

Controls how property names and values are parsed.

fn parse_rule(
    &mut self,
    selectors: &[TokenTree<S>],
    body: &S::Group
) -> Result<Self::Rule, Vec<Error<Self, S>>>

Controls how rule selectors and bodies are parsed.

Loading content...

Implementors

Loading content...