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 duplicate 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)>
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<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,
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