pub enum ParseResult<T, E, F = ()> {
Ok(T, Pos),
Fail(F, Pos),
Err(E, Pos),
}Variants§
Ok(T, Pos)
Called on a successful parse!
Fail(F, Pos)
The parser could not parse the input, perhaps another parser could. (This is used to implement backtracking)
Err(E, Pos)
The parser expected it could succeed, but it did not.
Trait Implementations§
Source§impl<T: Clone, E: Clone, F: Clone> Clone for ParseResult<T, E, F>
impl<T: Clone, E: Clone, F: Clone> Clone for ParseResult<T, E, F>
Source§fn clone(&self) -> ParseResult<T, E, F>
fn clone(&self) -> ParseResult<T, E, F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy, E: Copy, F: Copy> Copy for ParseResult<T, E, F>
impl<T: Eq, E: Eq, F: Eq> Eq for ParseResult<T, E, F>
impl<T, E, F> StructuralPartialEq for ParseResult<T, E, F>
Auto Trait Implementations§
impl<T, E, F> Freeze for ParseResult<T, E, F>
impl<T, E, F> RefUnwindSafe for ParseResult<T, E, F>
impl<T, E, F> Send for ParseResult<T, E, F>
impl<T, E, F> Sync for ParseResult<T, E, F>
impl<T, E, F> Unpin for ParseResult<T, E, F>
impl<T, E, F> UnwindSafe for ParseResult<T, E, F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F1, F2> CombineFail<'_, F2, ()> for F1
impl<F1, F2> CombineFail<'_, F2, ()> for F1
fn combine_fail(self, _: State<'_>, _: F2, _: State<'_>)
Source§impl<F1, F2> CombineFail<'_, F2, (F1, F2)> for F1
impl<F1, F2> CombineFail<'_, F2, (F1, F2)> for F1
Source§impl<'a, F1, F2> CombineFail<'a, F2, (F1, State<'a>, F2, State<'a>)> for F1
impl<'a, F1, F2> CombineFail<'a, F2, (F1, State<'a>, F2, State<'a>)> for F1
Source§impl<F> CombineManyFail<'_, ()> for F
impl<F> CombineManyFail<'_, ()> for F
fn combine_many_fail(_: Vec<(F, State<'_>)>)
Source§impl<F> CombineManyFail<'_, Vec<F>> for F
impl<F> CombineManyFail<'_, Vec<F>> for F
Source§impl<'a, F> CombineManyFail<'a, Vec<(F, State<'a>)>> for F
impl<'a, F> CombineManyFail<'a, Vec<(F, State<'a>)>> for F
Source§impl<X> Pipe for X
impl<X> Pipe for X
Source§fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
Source§fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
Source§fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read moreSource§fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read moreSource§fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read moreSource§fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Target = Param>. Read moreSource§fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
Apply
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read moreSource§fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Return
fn pipe_borrow_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
Apply
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. Read more