#[non_exhaustive]pub enum EscapeError {
EntityWithNull(Range<usize>),
UnrecognizedSymbol(Range<usize>, String),
UnterminatedEntity(Range<usize>),
TooLongHexadecimal,
InvalidHexadecimal(char),
TooLongDecimal,
InvalidDecimal(char),
InvalidCodepoint(u32),
}
Expand description
Escape/unescape error.
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.
EntityWithNull(Range<usize>)
Null character entity not allowed.
UnrecognizedSymbol(Range<usize>, String)
Unrecognized escape symbol.
UnterminatedEntity(Range<usize>)
Missing ; after &.
TooLongHexadecimal
Hexadecimal value is too long too convert to UTF-8.
InvalidHexadecimal(char)
Invalid hexadecimal character.
TooLongDecimal
Decimal value is too long to convert to UTF-8.
InvalidDecimal(char)
Invalid decimal character.
InvalidCodepoint(u32)
Invalid codepoint.
Trait Implementations§
Source§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)>
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 EscapeError
impl RefUnwindSafe for EscapeError
impl Send for EscapeError
impl Sync for EscapeError
impl Unpin for EscapeError
impl UnwindSafe for EscapeError
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