pub enum LexErrorKind {
InvalidByteSequence(u8),
UnknownChar(char),
UnterminatedString,
UnterminatedQuotedIdent,
UnterminatedBlockComment,
BadNumber(String),
TrailingJunkAfterNumber(String),
InvalidRadixLiteral(&'static str, String),
InvalidUnicodeEscape,
}Variants§
InvalidByteSequence(u8)
v7.39 (round 773, F31 J3) — an E-string’s byte escapes decoded
to an invalid UTF-8 sequence. PG decodes \NNN / \xHH as
BYTES and validates the whole literal (E'\303\251' is é;
E'\777' is byte 0xFF and refuses); the old decoder mapped
each byte to its Latin-1 codepoint, silently mangling every
multi-byte sequence.
UnknownChar(char)
UnterminatedString
UnterminatedQuotedIdent
UnterminatedBlockComment
BadNumber(String)
TrailingJunkAfterNumber(String)
v7.39 (round 184) — a numeric literal followed directly by an
identifier character (12__34, 123_, 1.5_, 123abc). PG
rejects at scan time; pre-r184 SPG silently lexed the number
and let the tail become a column alias (SELECT 12__34 → 12).
InvalidRadixLiteral(&'static str, String)
v7.39 (round 184) — a radix prefix with no digits (0x, 0o,
0b); pre-r184 the 0 lexed alone and the letter aliased.
Payload: (radix-name, literal-text).
InvalidUnicodeEscape
Trait Implementations§
Source§impl Clone for LexErrorKind
impl Clone for LexErrorKind
Source§fn clone(&self) -> LexErrorKind
fn clone(&self) -> LexErrorKind
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 Debug for LexErrorKind
impl Debug for LexErrorKind
impl Eq for LexErrorKind
Source§impl PartialEq for LexErrorKind
impl PartialEq for LexErrorKind
impl StructuralPartialEq for LexErrorKind
Auto Trait Implementations§
impl Freeze for LexErrorKind
impl RefUnwindSafe for LexErrorKind
impl Send for LexErrorKind
impl Sync for LexErrorKind
impl Unpin for LexErrorKind
impl UnsafeUnpin for LexErrorKind
impl UnwindSafe for LexErrorKind
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