pub(crate) enum Unescape {
Byte(u8),
Unicode(char),
}Expand description
Result of unescaping an escape-sequence in a string.
Variants§
Implementations§
Source§impl Unescape
impl Unescape
Sourcepub(crate) fn unwrap_char(self) -> char
pub(crate) fn unwrap_char(self) -> char
Returns this value as char, panicking if it’s a byte with a value > 0x7f.
Sourcepub(crate) fn unwrap_byte(self) -> u8
pub(crate) fn unwrap_byte(self) -> u8
Returns this value as u8, panicking if it was Unicode.
Auto Trait Implementations§
impl Freeze for Unescape
impl RefUnwindSafe for Unescape
impl Send for Unescape
impl Sync for Unescape
impl Unpin for Unescape
impl UnwindSafe for Unescape
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