Enum debris_error::ParseError
source · pub enum ParseError {
InvalidIntLiteral {
span: Span,
error: ParseIntError,
},
LeftoverInput {
span: Span,
},
UnexpectedComma {
span: Span,
},
UnexpectedFunctionIdent {
span: Span,
},
UnexpectedPath {
span: Span,
},
UnexpectedToken {
span: Span,
expected: Vec<String>,
},
}
Expand description
Thrown when parsing bad input
Contains the location in the source where the error occurred and what symbols were expected
Variants§
InvalidIntLiteral
LeftoverInput
Fields
§
span: Span
UnexpectedComma
Fields
§
span: Span
UnexpectedFunctionIdent
Fields
§
span: Span
UnexpectedPath
Fields
§
span: Span
UnexpectedToken
Implementations§
source§impl ParseError
impl ParseError
Trait Implementations§
source§impl<'a> AsAnnotationSnippet<'a> for ParseError
impl<'a> AsAnnotationSnippet<'a> for ParseError
fn as_annotation_snippet(&self, ctx: &'a CompileContext) -> SnippetOwned<'a>
fn to_display_list(&self, ctx: &'a CompileContext) -> String
source§impl Clone for ParseError
impl Clone for ParseError
source§fn clone(&self) -> ParseError
fn clone(&self) -> ParseError
Returns a copy 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 ParseError
impl Debug for ParseError
source§impl From<ParseError> for SingleCompileError
impl From<ParseError> for SingleCompileError
source§fn from(parse_error: ParseError) -> Self
fn from(parse_error: ParseError) -> Self
Converts to this type from the input type.
source§impl PartialEq for ParseError
impl PartialEq for ParseError
source§fn eq(&self, other: &ParseError) -> bool
fn eq(&self, other: &ParseError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ParseError
impl StructuralEq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnwindSafe for ParseError
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.