[−][src]Trait pahs::error_accumulator::ErrorAccumulator
Allows tracking multiple failures encountered in complex parsers or combinators.
Associated Types
type Accumulated
[src]
As which type the accumulated errors will be returned (by finish
).
Required methods
pub fn add_err(&mut self, err: E, pos: P)
[src]
Adds the specified error to the accumulation.
pub fn finish(self) -> Self::Accumulated
[src]
Consumes the accumulator, returning the accumulated errors.
Provided methods
pub fn add_progress<T>(
&mut self,
progress: Progress<P, T, E>
) -> Progress<P, T, ()> where
P: Clone,
[src]
&mut self,
progress: Progress<P, T, E>
) -> Progress<P, T, ()> where
P: Clone,
Consumes and accumulates the error in the specified Progress
, if any.
Implementations on Foreign Types
impl<P, E> ErrorAccumulator<P, E> for ()
[src]
type Accumulated = ()
pub fn add_err(&mut self, _err: E, _pos: P)
[src]
pub fn finish(self) -> Self::Accumulated
[src]
Implementors
impl<P, E> ErrorAccumulator<P, E> for AllBestErrorsAccumulator<P, E> where
P: Pos,
[src]
P: Pos,
type Accumulated = Vec<E>
pub fn add_err(&mut self, err: E, pos: P)
[src]
pub fn finish(self) -> Self::Accumulated
[src]
impl<P, E> ErrorAccumulator<P, E> for AllErrorsAccumulator<E>
[src]
type Accumulated = Vec<E>
pub fn add_err(&mut self, err: E, _pos: P)
[src]
pub fn finish(self) -> Self::Accumulated
[src]
impl<P, E> ErrorAccumulator<P, E> for LastErrorOnly<E>
[src]
type Accumulated = E
pub fn add_err(&mut self, err: E, _pos: P)
[src]
pub fn finish(self) -> Self::Accumulated
[src]
Panics if no error was added.