pub struct ParseError {
pub kind: ParseErrorKind,
pub span: Span,
}Expand description
A parse failure with its location.
Fields§
§kind: ParseErrorKindWhy it failed.
span: SpanWhere it failed.
Implementations§
Source§impl ParseError
impl ParseError
Sourcepub fn new(kind: ParseErrorKind, span: Span) -> ParseError
pub fn new(kind: ParseErrorKind, span: Span) -> ParseError
Returns a failure at a span.
Sourcepub fn code(&self) -> PrimaryCode
pub fn code(&self) -> PrimaryCode
Returns the stable result code this failure reports as.
A syntax error is SQLITE_ERROR, which is what the pinned release
returns from prepare. A limit is SQLITE_TOOBIG where SQLite uses it
and SQLITE_ERROR where SQLite reports the limit as a parse error,
which is the case for parser depth and compound depth.
Trait Implementations§
Source§impl Clone for ParseError
impl Clone for ParseError
Source§impl Debug for ParseError
impl Debug for ParseError
impl Eq for ParseError
Source§impl From<LexError> for ParseError
impl From<LexError> for ParseError
Source§fn from(error: LexError) -> ParseError
fn from(error: LexError) -> ParseError
Lifts a lexer failure into a parse failure at the same offset.
Source§impl From<ParseError> for DbError
impl From<ParseError> for DbError
Source§fn from(error: ParseError) -> DbError
fn from(error: ParseError) -> DbError
Converts a parse failure into the engine’s stable error, keeping the offset so a caller can point at the character.
Source§impl PartialEq for ParseError
impl PartialEq for ParseError
impl StructuralPartialEq for ParseError
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin 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