Trait Parser

Source
pub trait Parser<Input> {
    type Output;

    // Required method
    fn parse(&self, input: Input, config: &ParserConfig) -> Result<Self::Output>;

    // Provided methods
    fn name(&self) -> &str { ... }
    fn config(&self) -> ParserConfig { ... }
}

Required Associated Types§

Required Methods§

Source

fn parse(&self, input: Input, config: &ParserConfig) -> Result<Self::Output>

Provided Methods§

Source

fn name(&self) -> &str

Source

fn config(&self) -> ParserConfig

Implementors§

Source§

impl Parser<&str> for IdentifierParser

Source§

impl Parser<&str> for PathParser

Source§

impl Parser<&Path> for IdentifierParser

Source§

impl Parser<String> for IdentifierParser

Source§

impl Parser<Ident> for IdentifierParser

Source§

impl Parser<Ident> for PathParser

Source§

impl Parser<Path> for PathParser

Source§

impl<L: LiteralParser> Parser<&str> for AttributesParser<L>

Source§

impl<L: LiteralParser> Parser<String> for AttributesParser<L>

Source§

impl<L: LiteralParser> Parser<Vec<Attribute>> for AttributesParser<L>

Source§

impl<L: LiteralParser> Parser<Punctuated<Meta, Comma>> for AttributesParser<L>

Source§

impl<L: LiteralParser> Parser<Punctuated<Expr, Comma>> for AttributesParser<L>

Source§

impl<L: LiteralParser> Parser<Punctuated<IntermediaryAttribute, Comma>> for AttributesParser<L>

Source§

impl<T: LiteralParser> Parser<&str> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<Meta> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<Expr> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<Lit> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<String> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<Attribute> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<MetaList> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<MetaNameValue> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<ExprAssign> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<ExprCall> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<ExprPath> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<ItemMacro> for AttributeParser<T>

Source§

impl<T: LiteralParser> Parser<Path> for AttributeParser<T>