pub struct Error {
pub kind: ErrorKind,
pub span: Range<usize>,
pub expected: Vec<TargetKind>,
pub label: Option<&'static str>,
}
Fields§
§kind: ErrorKind
§span: Range<usize>
§expected: Vec<TargetKind>
§label: Option<&'static str>
Trait Implementations§
Source§impl<T> Error<T> for Errorwhere
T: Into<TargetKind>,
impl<T> Error<T> for Errorwhere
T: Into<TargetKind>,
Source§type Label = &'static str
type Label = &'static str
The label used to describe a syntatic structure currently being parsed. Read more
Source§fn expected_input_found<Iter>(
span: <Error as Error<T>>::Span,
expected: Iter,
found: Option<T>,
) -> Errorwhere
Iter: IntoIterator<Item = Option<T>>,
fn expected_input_found<Iter>(
span: <Error as Error<T>>::Span,
expected: Iter,
found: Option<T>,
) -> Errorwhere
Iter: IntoIterator<Item = Option<T>>,
Create a new error describing a conflict between expected inputs and that which was actually found. Read more
Source§fn unclosed_delimiter(
span: <Error as Error<T>>::Span,
start: T,
before_span: <Error as Error<T>>::Span,
expected: T,
before: Option<T>,
) -> Error
fn unclosed_delimiter( span: <Error as Error<T>>::Span, start: T, before_span: <Error as Error<T>>::Span, expected: T, before: Option<T>, ) -> Error
Create a new error describing a delimiter that was not correctly closed. Read more
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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