Enum lua_parser::TokenizeError
source · #[non_exhaustive]pub enum TokenizeError {
Show 13 variants
ShortStringNewline {
start: usize,
pos: usize,
},
ShortStringNotClosed {
delim: char,
start: usize,
end: usize,
},
ShortStringInvalidEscape {
start: usize,
pos: usize,
escape: char,
},
ShortStringNotHex {
start: usize,
pos: usize,
},
ShortStringNotDecimal {
start: usize,
pos: usize,
},
ShortStringNoOpenBrace {
start: usize,
pos: usize,
},
ShortStringOverflow {
start: usize,
pos: usize,
},
ShortStringEmptyCodepoint {
start: usize,
escape_start: usize,
escape_end: usize,
},
LongStringNotClosed {
start: usize,
end: usize,
equal_count: usize,
},
InvalidUtf8 {
start: usize,
end: usize,
error: FromUtf8Error,
},
InvalidPunct {
pos: usize,
punct: char,
},
MultilineCommentNotClosed {
start: usize,
end: usize,
},
NumericEmpty {
start: usize,
pos: usize,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ShortStringNewline
ShortStringNotClosed
Fields
ShortStringInvalidEscape
Fields
ShortStringNotHex
for \xXX escape
Fields
ShortStringNotDecimal
for \ddd escape
Fields
ShortStringNoOpenBrace
for \u{XXX} escape
Fields
ShortStringOverflow
for \u{XXX} escape codepoint exceeds 2^31
Fields
ShortStringEmptyCodepoint
for \u{XXX} escape
Fields
LongStringNotClosed
Fields
InvalidUtf8
Fields
§
error: FromUtf8ErrorInvalidPunct
MultilineCommentNotClosed
NumericEmpty
Trait Implementations§
source§impl Debug for TokenizeError
impl Debug for TokenizeError
source§impl Display for TokenizeError
impl Display for TokenizeError
source§impl Error for TokenizeError
impl Error for TokenizeError
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()
Auto Trait Implementations§
impl Freeze for TokenizeError
impl RefUnwindSafe for TokenizeError
impl Send for TokenizeError
impl Sync for TokenizeError
impl Unpin for TokenizeError
impl UnwindSafe for TokenizeError
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