CreateParserState

Trait CreateParserState 

Source
pub trait CreateParserState: Parser {
    // Required method
    fn create_parser_state(&self) -> <Self as Parser>::PartialState;
}
Expand description

A trait for a parser with a default state.

Required Methods§

Source

fn create_parser_state(&self) -> <Self as Parser>::PartialState

Create the default state of the parser.

Implementations on Foreign Types§

Source§

impl<P: ?Sized + CreateParserState> CreateParserState for &P

Source§

impl<P: ?Sized + CreateParserState> CreateParserState for Box<P>

Source§

impl<P: ?Sized + CreateParserState> CreateParserState for Arc<P>

Implementors§

Source§

impl CreateParserState for StructureParser

Source§

impl CreateParserState for FloatParser

Source§

impl CreateParserState for I8Parser

Source§

impl CreateParserState for I16Parser

Source§

impl CreateParserState for I32Parser

Source§

impl CreateParserState for I64Parser

Source§

impl CreateParserState for IntegerParser

Source§

impl CreateParserState for LiteralParser

Source§

impl CreateParserState for OneLine

Source§

impl CreateParserState for RegexParser

Source§

impl CreateParserState for U8Parser

Source§

impl CreateParserState for U16Parser

Source§

impl CreateParserState for U32Parser

Source§

impl CreateParserState for U64Parser

Source§

impl<F: Fn(char) -> bool + 'static> CreateParserState for StringParser<F>

Source§

impl<O1, O2, PA1, PA2, P1: Parser<Output = O1, PartialState = PA1> + CreateParserState, P2: Parser<Output = O2, PartialState = PA2> + CreateParserState> CreateParserState for ChoiceParser<P1, P2>

Source§

impl<O, PA, P: Parser<Output = O, PartialState = PA> + CreateParserState> CreateParserState for RepeatParser<P>
where P::PartialState: Clone, P::Output: Clone,

Source§

impl<O: Clone> CreateParserState for ArcParser<O>

Source§

impl<P1: CreateParserState, P2: CreateParserState> CreateParserState for SequenceParser<P1, P2>

Source§

impl<P1: CreateParserState, P2: CreateParserState, F: Fn(&P1::Output) -> P2> CreateParserState for ThenLazy<P1, F>

Source§

impl<P: CreateParserState, F: FnOnce() -> P> CreateParserState for LazyParser<P, F>

Source§

impl<P: CreateParserState, O: Clone, F: Fn(P::Output) -> O> CreateParserState for MapOutputParser<P, O, F>

Source§

impl<P: CreateParserState, S: CreateParserState> CreateParserState for SeparatedParser<P, S>

Source§

impl<P: Parser, F: Fn() -> P::PartialState + Clone> CreateParserState for WithInitialState<P, F>

Source§

impl<S: AsRef<str>> CreateParserState for StopOn<S>

Source§

impl<S: CreateParserState> CreateParserState for IndexParser<S>

Source§

impl<const MIN_LENGTH: usize, const MAX_LENGTH: usize> CreateParserState for SentenceParser<MIN_LENGTH, MAX_LENGTH>

Source§

impl<const MIN_LENGTH: usize, const MAX_LENGTH: usize> CreateParserState for WordParser<MIN_LENGTH, MAX_LENGTH>