pub enum Result<T, L: Lexicon> {
Success(T),
Recovered(T, Vec<Error<L>>),
Panic(Vec<Error<L>>),
}Expand description
Result of parsing an AST node
Variants§
Success(T)
The AST node was successfully parsed, with the corresponding tokens consumed
Recovered(T, Vec<Error<L>>)
The parser panicked while parsing the AST node, but it was able to skip some tokens and recover.
Panic(Vec<Error<L>>)
The parser panicked while parsing the AST node, and was unable to recover. The parser might have advanced its position in the input.
Implementations§
Auto Trait Implementations§
impl<T, L> Freeze for Result<T, L>where
T: Freeze,
impl<T, L> RefUnwindSafe for Result<T, L>
impl<T, L> Send for Result<T, L>
impl<T, L> Sync for Result<T, L>
impl<T, L> Unpin for Result<T, L>
impl<T, L> UnwindSafe for Result<T, L>
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more