[][src]Trait aoc_next::parser::Parsing

pub trait Parsing<P> {
    pub fn run(&self, input: &str) -> Result<P>;
pub fn name(&self) -> &'static str; }

Container for a parsing function.

The contained function transforms the input file into a better usable structure.

Allows to have both failable and infailable parsers, respective Parser and FailableParser (where the function type is a result).

Required methods

pub fn run(&self, input: &str) -> Result<P>[src]

Transforms the file input into a better usable structure.

pub fn name(&self) -> &'static str[src]

The name of the parsing function.

Loading content...

Implementors

impl<F, P> Parsing<P> for FailableParser<F, P> where
    F: Fn(&str) -> Result<P>, 
[src]

impl<F, P> Parsing<P> for Parser<F, P> where
    F: Fn(&str) -> P, 
[src]

Loading content...