Enum lucia_lang::errors::EscapeError
source · pub enum EscapeError {
Show 13 variants
InvalidEscape,
BareCarriageReturn,
TooShortHexEscape,
InvalidCharInHexEscape,
OutOfRangeHexEscape,
NoBraceInUnicodeEscape,
InvalidCharInUnicodeEscape,
EmptyUnicodeEscape,
UnclosedUnicodeEscape,
LeadingUnderscoreUnicodeEscape,
OverlongUnicodeEscape,
LoneSurrogateUnicodeEscape,
OutOfRangeUnicodeEscape,
}Expand description
Errors and warnings that can occur during string unescaping.
Variants§
InvalidEscape
Invalid escape character (e.g. ‘\z’).
BareCarriageReturn
Raw ‘\r’ encountered.
TooShortHexEscape
Numeric character escape is too short (e.g. ‘\x1’).
InvalidCharInHexEscape
Invalid character in numeric escape (e.g. ‘\xz’)
OutOfRangeHexEscape
Character code in numeric escape is non-ascii (e.g. ‘\xFF’).
NoBraceInUnicodeEscape
‘\u’ not followed by ‘{’.
InvalidCharInUnicodeEscape
Non-hexadecimal value in ‘\u{..}’.
EmptyUnicodeEscape
‘\u{}’
UnclosedUnicodeEscape
No closing brace in ‘\u{..}’, e.g. ‘\u{12’.
LeadingUnderscoreUnicodeEscape
‘\u{_12}’
OverlongUnicodeEscape
More than 6 characters in ‘\u{..}’, e.g. ‘\u{10FFFF_FF}’
LoneSurrogateUnicodeEscape
Invalid in-bound unicode character code, e.g. ‘\u{DFFF}’.
OutOfRangeUnicodeEscape
Out of bounds unicode character code, e.g. ‘\u{FFFFFF}’.
Trait Implementations§
source§impl Clone for EscapeError
impl Clone for EscapeError
source§fn clone(&self) -> EscapeError
fn clone(&self) -> EscapeError
Returns a copy 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 Debug for EscapeError
impl Debug for EscapeError
source§impl Display for EscapeError
impl Display for EscapeError
source§impl Error for EscapeError
impl Error for EscapeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 From<EscapeError> for SyntaxError
impl From<EscapeError> for SyntaxError
source§fn from(source: EscapeError) -> Self
fn from(source: EscapeError) -> Self
Converts to this type from the input type.
source§impl PartialEq<EscapeError> for EscapeError
impl PartialEq<EscapeError> for EscapeError
source§fn eq(&self, other: &EscapeError) -> bool
fn eq(&self, other: &EscapeError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for EscapeError
impl StructuralEq for EscapeError
impl StructuralPartialEq for EscapeError
Auto Trait Implementations§
impl RefUnwindSafe for EscapeError
impl Send for EscapeError
impl Sync for EscapeError
impl Unpin for EscapeError
impl UnwindSafe for EscapeError
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.