pub enum UnescapeError {
InvalidUtf8,
BadEscape(&'static str),
}Available on crate feature
text only.Expand description
Error returned by unescape and unescape_str.
Its Display text is the BadEscape string, or
unescaped bytes are not valid UTF-8.
Variants§
InvalidUtf8
The unescaped bytes are not valid UTF-8. Only produced by
unescape_str; unescape is byte-level and never returns this.
BadEscape(&'static str)
A malformed escape sequence or structural problem in the literal. The string describes the specific failure.
Trait Implementations§
Source§impl Clone for UnescapeError
impl Clone for UnescapeError
impl Copy for UnescapeError
Source§impl Debug for UnescapeError
impl Debug for UnescapeError
Source§impl Display for UnescapeError
impl Display for UnescapeError
impl Eq for UnescapeError
Source§impl Error for UnescapeError
impl Error for UnescapeError
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()
Source§impl PartialEq for UnescapeError
impl PartialEq for UnescapeError
impl StructuralPartialEq for UnescapeError
Auto Trait Implementations§
impl Forget for UnescapeError
impl Freeze for UnescapeError
impl Move for UnescapeError
impl RefUnwindSafe for UnescapeError
impl Send for UnescapeError
impl Sync for UnescapeError
impl Unpin for UnescapeError
impl UnsafeUnpin for UnescapeError
impl UnwindSafe for UnescapeError
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