Struct sqlparser_mysql::base::error::ParseSQLError
source · pub struct ParseSQLError<I>where
I: InputLength,{
pub errors: Vec<(I, ParseSQLErrorKind)>,
}
Expand description
nom::branch::alt return the last error of the branch by default
With a custom error type it is possible to have nom::branch::alt return the error of the parser that went the farthest in the input data.
There is little difference between ParseSQLError and nom::error::VerboseError
Fields§
§errors: Vec<(I, ParseSQLErrorKind)>
Trait Implementations§
source§impl<I> Clone for ParseSQLError<I>where
I: InputLength + Clone,
impl<I> Clone for ParseSQLError<I>where
I: InputLength + Clone,
source§fn clone(&self) -> ParseSQLError<I>
fn clone(&self) -> ParseSQLError<I>
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<I: InputLength> ContextError<I> for ParseSQLError<I>
impl<I: InputLength> ContextError<I> for ParseSQLError<I>
source§fn add_context(input: I, ctx: &'static str, other: Self) -> Self
fn add_context(input: I, ctx: &'static str, other: Self) -> Self
Creates a new error from an input position, a static string and an existing error.
This is used mainly in the context combinator, to add user friendly information
to errors when backtracking through a parse tree
source§impl<I> Debug for ParseSQLError<I>where
I: InputLength + Debug,
impl<I> Debug for ParseSQLError<I>where
I: InputLength + Debug,
source§impl<I: Display + InputLength> Display for ParseSQLError<I>
impl<I: Display + InputLength> Display for ParseSQLError<I>
source§impl<I: Debug + Display + InputLength> Error for ParseSQLError<I>
impl<I: Debug + Display + InputLength> Error for ParseSQLError<I>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<I: InputLength, E> FromExternalError<I, E> for ParseSQLError<I>
impl<I: InputLength, E> FromExternalError<I, E> for ParseSQLError<I>
source§fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
fn from_external_error(input: I, kind: ErrorKind, _e: E) -> Self
Create a new error from an input position and an external error
source§impl<I> ParseError<I> for ParseSQLError<I>where
I: InputLength,
impl<I> ParseError<I> for ParseSQLError<I>where
I: InputLength,
source§fn from_error_kind(input: I, kind: ErrorKind) -> Self
fn from_error_kind(input: I, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
source§fn append(input: I, kind: ErrorKind, other: Self) -> Self
fn append(input: I, 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<I> PartialEq for ParseSQLError<I>where
I: InputLength + PartialEq,
impl<I> PartialEq for ParseSQLError<I>where
I: InputLength + PartialEq,
source§fn eq(&self, other: &ParseSQLError<I>) -> bool
fn eq(&self, other: &ParseSQLError<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<I> StructuralPartialEq for ParseSQLError<I>where
I: InputLength,
Auto Trait Implementations§
impl<I> Freeze for ParseSQLError<I>
impl<I> RefUnwindSafe for ParseSQLError<I>where
I: RefUnwindSafe,
impl<I> Send for ParseSQLError<I>where
I: Send,
impl<I> Sync for ParseSQLError<I>where
I: Sync,
impl<I> Unpin for ParseSQLError<I>where
I: Unpin,
impl<I> UnwindSafe for ParseSQLError<I>where
I: UnwindSafe,
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