Expand description
A minimal error type that tracks only the error span and label. This type is most useful when you want fast parsing but do not particularly care about the quality of error messages.
Implementations
Trait Implementations
sourceimpl<I, S: Span + Clone + Debug> Error<I> for Cheap<I, S>
impl<I, S: Span + Clone + Debug> Error<I> for Cheap<I, S>
type Span = S
type Span = S
The type of spans to be used in the error.
type Label = &'static str
type Label = &'static str
The label used to describe a syntatic structure currently being parsed. Read more
sourcefn expected_input_found<Iter: IntoIterator<Item = Option<I>>>(
span: Self::Span,
_: Iter,
_: Option<I>
) -> Self
fn expected_input_found<Iter: IntoIterator<Item = Option<I>>>(
span: Self::Span,
_: Iter,
_: Option<I>
) -> Self
Create a new error describing a conflict between expected inputs and that which was actually found. Read more
sourcefn with_label(self, label: Self::Label) -> Self
fn with_label(self, label: Self::Label) -> Self
Indicate that the error occured while parsing a particular syntactic structure. Read more
impl<I: Eq, S: Eq> Eq for Cheap<I, S>
impl<I, S> StructuralEq for Cheap<I, S>
impl<I, S> StructuralPartialEq for Cheap<I, S>
Auto Trait Implementations
impl<I, S> RefUnwindSafe for Cheap<I, S> where
I: RefUnwindSafe,
S: RefUnwindSafe,
impl<I, S> Send for Cheap<I, S> where
I: Send,
S: Send,
impl<I, S> Sync for Cheap<I, S> where
I: Sync,
S: Sync,
impl<I, S> Unpin for Cheap<I, S> where
I: Unpin,
S: Unpin,
impl<I, S> UnwindSafe for Cheap<I, S> where
I: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more