pub trait HasParser {
    type Parser: Parser<Output = Self>;

    // Required methods
    fn new_parser() -> Self::Parser;
    fn create_parser_state() -> <Self::Parser as Parser>::PartialState;
}
Expand description

Data that can be parsed incrementally.

Required Associated Types§

source

type Parser: Parser<Output = Self>

The parser for the data.

Required Methods§

source

fn new_parser() -> Self::Parser

Create a new parser.

source

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

Create a new parser state.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl HasParser for i8

source§

impl HasParser for i16

source§

impl HasParser for i32

source§

impl HasParser for i64

source§

impl HasParser for u8

source§

impl HasParser for u16

source§

impl HasParser for u32

source§

impl HasParser for u64

source§

impl HasParser for String

source§

impl<T: HasParser> HasParser for Vec<T>

source§

impl<const N: usize, T: HasParser> HasParser for [T; N]

Implementors§

source§

impl<const MIN_LENGTH: usize, const MAX_LENGTH: usize> HasParser for Sentence<MIN_LENGTH, MAX_LENGTH>

§

type Parser = SentenceParser<MIN_LENGTH, MAX_LENGTH>

source§

impl<const MIN_LENGTH: usize, const MAX_LENGTH: usize> HasParser for Word<MIN_LENGTH, MAX_LENGTH>

§

type Parser = WordParser<MIN_LENGTH, MAX_LENGTH>