pub struct SyntaxError<'a> {
pub errors: Vec<(SyntaxErrorKind, Span<'a>)>,
}
Fields§
§errors: Vec<(SyntaxErrorKind, Span<'a>)>
Implementations§
Source§impl<'a> SyntaxError<'a>
impl<'a> SyntaxError<'a>
Trait Implementations§
Source§impl<'a> Clone for SyntaxError<'a>
impl<'a> Clone for SyntaxError<'a>
Source§fn clone(&self) -> SyntaxError<'a>
fn clone(&self) -> SyntaxError<'a>
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<'a> ContextError<LocatedSpan<&'a str>> for SyntaxError<'a>
impl<'a> ContextError<LocatedSpan<&'a str>> for SyntaxError<'a>
Source§impl<'a> Debug for SyntaxError<'a>
impl<'a> Debug for SyntaxError<'a>
Source§impl<'a> Default for SyntaxError<'a>
impl<'a> Default for SyntaxError<'a>
Source§fn default() -> SyntaxError<'a>
fn default() -> SyntaxError<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> Display for SyntaxError<'a>
impl<'a> Display for SyntaxError<'a>
Source§impl<'a> Error for SyntaxError<'a>
impl<'a> Error for SyntaxError<'a>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<'a> From<SyntaxError<'a>> for ParseError
impl<'a> From<SyntaxError<'a>> for ParseError
Source§fn from(error: SyntaxError<'a>) -> Self
fn from(error: SyntaxError<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a, E> FromExternalError<LocatedSpan<&'a str>, E> for SyntaxError<'a>
impl<'a, E> FromExternalError<LocatedSpan<&'a str>, E> for SyntaxError<'a>
Source§impl<'a> Into<Err<SyntaxError<'a>>> for SyntaxError<'a>
impl<'a> Into<Err<SyntaxError<'a>>> for SyntaxError<'a>
Source§fn into(self) -> Err<SyntaxError<'a>>
fn into(self) -> Err<SyntaxError<'a>>
Converts this type into the (usually inferred) input type.
Source§impl<'a> ParseError<LocatedSpan<&'a str>> for SyntaxError<'a>
impl<'a> ParseError<LocatedSpan<&'a str>> for SyntaxError<'a>
Source§fn from_error_kind(input: Span<'a>, kind: ErrorKind) -> Self
fn from_error_kind(input: Span<'a>, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(input: Span<'a>, kind: ErrorKind, other: Self) -> Self
fn append(input: Span<'a>, kind: ErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
Source§impl<'a> PartialEq for SyntaxError<'a>
impl<'a> PartialEq for SyntaxError<'a>
impl<'a> StructuralPartialEq for SyntaxError<'a>
Auto Trait Implementations§
impl<'a> Freeze for SyntaxError<'a>
impl<'a> RefUnwindSafe for SyntaxError<'a>
impl<'a> Send for SyntaxError<'a>
impl<'a> Sync for SyntaxError<'a>
impl<'a> Unpin for SyntaxError<'a>
impl<'a> UnwindSafe for SyntaxError<'a>
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