pub enum ParserError {
ExpectedFound {
span: SimpleSpan,
},
UnknownPrefix {
span: SimpleSpan,
prefix: String,
},
Reserved {
span: SimpleSpan,
name: String,
},
ArityOverflow {
span: SimpleSpan,
},
UnknownType {
span: SimpleSpan,
name: Name,
},
IllegalFunctionInPattern {
span: SimpleSpan,
name: Name,
},
}
Variants§
ExpectedFound
Fields
§
span: SimpleSpan
UnknownPrefix
Reserved
ArityOverflow
Fields
§
span: SimpleSpan
UnknownType
IllegalFunctionInPattern
Implementations§
Trait Implementations§
Source§impl Clone for ParserError
impl Clone for ParserError
Source§fn clone(&self) -> ParserError
fn clone(&self) -> ParserError
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 moreSource§impl Debug for ParserError
impl Debug for ParserError
Source§impl<'a, I> Error<'a, I> for ParserError
impl<'a, I> Error<'a, I> for ParserError
Source§impl<'a, I, L> LabelError<'a, I, L> for ParserError
impl<'a, I, L> LabelError<'a, I, L> for ParserError
Source§fn expected_found<E: IntoIterator<Item = L>>(
_expected: E,
_found: Option<MaybeRef<'a, I::Token>>,
span: I::Span,
) -> Self
fn expected_found<E: IntoIterator<Item = L>>( _expected: E, _found: Option<MaybeRef<'a, I::Token>>, span: I::Span, ) -> Self
Create a new error describing a conflict between expected inputs and that which was actually found. Read more
Source§fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
fn merge_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Self: Error<'src, I>,
Fast path for
a.merge(LabelError::expected_found(...))
that may incur less overhead by, for example, reusing allocations.Source§fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
fn replace_expected_found<E>(
self,
expected: E,
found: Option<Maybe<<I as Input<'src>>::Token, &'src <I as Input<'src>>::Token>>,
span: <I as Input<'src>>::Span,
) -> Selfwhere
E: IntoIterator<Item = L>,
Fast path for
a = LabelError::expected_found(...)
that may incur less overhead by, for example, reusing allocations.Source§fn label_with(&mut self, label: L)
fn label_with(&mut self, label: L)
Annotate the expected patterns within this parser with the given label. Read more
Source§impl PartialEq for ParserError
impl PartialEq for ParserError
impl StructuralPartialEq for ParserError
Auto Trait Implementations§
impl Freeze for ParserError
impl RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl UnwindSafe for ParserError
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<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