pub enum EscapeUnit {
}
Expand description
Element of an EscapedString
Variants§
Literal(char)
Literal single character
DoubleQuote
Backslash-escaped double-quote character (\"
)
SingleQuote
Backslash-escaped single-quote character (\'
)
Backslash
Backslash-escaped backslash character (\\
)
Question
Backslash-escaped question mark character (\?
)
Alert
Backslash notation for the bell character (\a
, ASCII 7)
Backspace
Backslash notation for the backspace character (\b
, ASCII 8)
Escape
Backslash notation for the escape character (\e
, ASCII 27)
FormFeed
Backslash notation for the form feed character (\f
, ASCII 12)
Newline
Backslash notation for the newline character (\n
, ASCII 10)
CarriageReturn
Backslash notation for the carriage return character (\r
, ASCII 13)
Tab
Backslash notation for the horizontal tab character (\t
, ASCII 9)
VerticalTab
Backslash notation for the vertical tab character (\v
, ASCII 11)
Control(u8)
Control character notation (\c...
)
The associated value is the control character represented by the following character in the input.
Octal(u8)
Single-byte octal notation (\OOO
)
The associated value is the byte represented by the three octal digits following the backslash.
Hex(u8)
Single-byte hexadecimal notation (\xHH
)
The associated value is the byte represented by the two hexadecimal
digits following the x
.
Unicode(char)
Unicode notation (\uHHHH
or \UHHHHHHHH
)
The associated value is the Unicode scalar value represented by the four
or eight hexadecimal digits following the u
or U
.
Trait Implementations§
Source§impl Clone for EscapeUnit
impl Clone for EscapeUnit
Source§fn clone(&self) -> EscapeUnit
fn clone(&self) -> EscapeUnit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EscapeUnit
impl Debug for EscapeUnit
Source§impl Display for EscapeUnit
impl Display for EscapeUnit
Source§impl FromStr for EscapeUnit
impl FromStr for EscapeUnit
Source§impl MaybeLiteral for EscapeUnit
impl MaybeLiteral for EscapeUnit
Source§fn extend_literal<T: Extend<char>>(
&self,
result: &mut T,
) -> Result<(), NotLiteral>
fn extend_literal<T: Extend<char>>( &self, result: &mut T, ) -> Result<(), NotLiteral>
self
to an extendable object. Read moreSource§fn to_string_if_literal(&self) -> Option<String>
fn to_string_if_literal(&self) -> Option<String>
self
is literal and, if so, converts to a string.Source§impl PartialEq for EscapeUnit
impl PartialEq for EscapeUnit
Source§impl Unquote for EscapeUnit
Converts an escape unit into the string represented by the escape sequence.
impl Unquote for EscapeUnit
Converts an escape unit into the string represented by the escape sequence.
Produces an empty string if the escape unit does not represent a valid Unicode scalar value.
impl Eq for EscapeUnit
impl StructuralPartialEq for EscapeUnit
Auto Trait Implementations§
impl Freeze for EscapeUnit
impl RefUnwindSafe for EscapeUnit
impl Send for EscapeUnit
impl Sync for EscapeUnit
impl Unpin for EscapeUnit
impl UnwindSafe for EscapeUnit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more