Struct peresil::Progress[][src]

#[must_use]
pub struct Progress<P, T, E> { pub point: P, pub status: Status<T, E>, }

Tracks where the parser currently is and if it is successful.

On success, some value has been parsed. On failure, nothing has been parsed and the value indicates the reason for the failure. The returned point indicates where to next start parsing, often unchanged on failure.

Fields

The current location.

If the point indicates the location of a successful or failed parse.

Methods

impl<P, T, E> Progress<P, T, E>
[src]

Convert the success value, if there is one.

Convert the success value, if there is one, potentially converting into a failure.

Convert the failure value, if there is one.

Returns the value on success, or rewinds the point and returns None on failure.

Trait Implementations

impl<P: Debug, T: Debug, E: Debug> Debug for Progress<P, T, E>
[src]

Formats the value using the given formatter. Read more

impl<P: Copy, T: Copy, E: Copy> Copy for Progress<P, T, E>
[src]

impl<P: Clone, T: Clone, E: Clone> Clone for Progress<P, T, E>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<P: PartialEq, T: PartialEq, E: PartialEq> PartialEq for Progress<P, T, E>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl<P, T, E> Send for Progress<P, T, E> where
    E: Send,
    P: Send,
    T: Send

impl<P, T, E> Sync for Progress<P, T, E> where
    E: Sync,
    P: Sync,
    T: Sync