pub struct Progress<P, T, E> {
pub point: P,
pub status: Status<T, E>,
}
Expand description
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§
§point: P
The current location.
status: Status<T, E>
If the point indicates the location of a successful or failed parse.
Implementations§
Source§impl<P, T, E> Progress<P, T, E>
impl<P, T, E> Progress<P, T, E>
pub fn success(point: P, val: T) -> Progress<P, T, E>
pub fn failure(point: P, val: E) -> Progress<P, T, E>
Sourcepub fn map<F, T2>(self, f: F) -> Progress<P, T2, E>where
F: FnOnce(T) -> T2,
pub fn map<F, T2>(self, f: F) -> Progress<P, T2, E>where
F: FnOnce(T) -> T2,
Convert the success value, if there is one.
Trait Implementations§
impl<P, T, E> StructuralPartialEq for Progress<P, T, E>
Auto Trait Implementations§
impl<P, T, E> Freeze for Progress<P, T, E>
impl<P, T, E> RefUnwindSafe for Progress<P, T, E>
impl<P, T, E> Send for Progress<P, T, E>
impl<P, T, E> Sync for Progress<P, T, E>
impl<P, T, E> Unpin for Progress<P, T, E>
impl<P, T, E> UnwindSafe for Progress<P, T, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more