[][src]Trait tweep::Parser

pub trait Parser<'a> {
    type Output;
    type Input: ?Sized;
    fn parse(input: &'a Self::Input) -> Self::Output;
}

This trait represents a parser which takes a reference to some input of type Input and parses it to produce an output of type Output

Associated Types

type Output

The type produced by this parser

type Input: ?Sized

The type accepted by this parser

Loading content...

Required methods

fn parse(input: &'a Self::Input) -> Self::Output

Performs the parsing operation and returns the result

Arguments

  • input - the input to parse
Loading content...

Implementors

impl<'a> Parser<'a> for Passage[src]

type Output = Output<Result<Self, ErrorList>>

type Input = [&'a str]

impl<'a> Parser<'a> for PassageHeader[src]

type Output = Output<Result<Self, ErrorList>>

type Input = str

impl<'a> Parser<'a> for ScriptContent[src]

type Output = Output<Result<Self, ErrorList>>

type Input = [&'a str]

impl<'a> Parser<'a> for StoryData[src]

type Output = Output<Result<Option<Self>, ErrorList>>

type Input = [&'a str]

impl<'a> Parser<'a> for StoryPassages[src]

type Output = Output<Result<Self, ErrorList>>

type Input = [&'a str]

impl<'a> Parser<'a> for StoryTitle[src]

type Output = Output<Result<Self, ErrorList>>

type Input = [&'a str]

impl<'a> Parser<'a> for StylesheetContent[src]

type Output = Output<Result<Self, ErrorList>>

type Input = [&'a str]

impl<'a> Parser<'a> for TwineContent[src]

type Output = Output<Result<Self, ErrorList>>

type Input = [&'a str]

Loading content...