pub enum ParseError<'a> {
Lexer(LexerError),
UnexpectedToken {
expected: &'static str,
found: TokenKind<'a>,
pos: usize,
},
UnexpectedEof {
expected: &'static str,
},
EmptyColumnList,
DuplicateColumn(String),
UnknownPKColumn {
column: String,
},
UnknownTable(&'a str),
UnknownColumn(&'a str),
MissingWhere {
statement: &'static str,
},
WhereNonPKColumn {
column: &'a str,
},
}Expand description
SQL parser errors.
Variants§
Lexer(LexerError)
Lexer error.
UnexpectedToken
Unexpected token.
Fields
§
found: TokenKind<'a>What was found.
UnexpectedEof
Unexpected end of input.
EmptyColumnList
Empty column list.
DuplicateColumn(String)
Duplicate column name.
UnknownPKColumn
Unknown column in PRIMARY KEY constraint.
UnknownTable(&'a str)
Unknown table name in statement.
UnknownColumn(&'a str)
Unknown column name in statement.
MissingWhere
Missing WHERE clause in UPDATE or DELETE.
WhereNonPKColumn
Where constraint on non-PK column.
Trait Implementations§
Source§impl<'a> Clone for ParseError<'a>
impl<'a> Clone for ParseError<'a>
Source§fn clone(&self) -> ParseError<'a>
fn clone(&self) -> ParseError<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ParseError<'a>
impl<'a> Debug for ParseError<'a>
Source§impl<'a> Display for ParseError<'a>
impl<'a> Display for ParseError<'a>
Source§impl<'a> Error for ParseError<'a>
impl<'a> Error for ParseError<'a>
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> PartialEq for ParseError<'a>
impl<'a> PartialEq for ParseError<'a>
Source§fn eq(&self, other: &ParseError<'a>) -> bool
fn eq(&self, other: &ParseError<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for ParseError<'a>
Auto Trait Implementations§
impl<'a> Freeze for ParseError<'a>
impl<'a> RefUnwindSafe for ParseError<'a>
impl<'a> Send for ParseError<'a>
impl<'a> Sync for ParseError<'a>
impl<'a> Unpin for ParseError<'a>
impl<'a> UnsafeUnpin for ParseError<'a>
impl<'a> UnwindSafe for ParseError<'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