pub struct EscapedString(pub Vec<EscapeUnit>);
Expand description
String that may contain some escapes
An escaped string is a sequence of escape units, which may contain some kinds of escapes. This type is used for the value of a dollar-single-quoted string.
Tuple Fields§
§0: Vec<EscapeUnit>
Trait Implementations§
Source§impl Clone for EscapedString
impl Clone for EscapedString
Source§fn clone(&self) -> EscapedString
fn clone(&self) -> EscapedString
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 EscapedString
impl Debug for EscapedString
Source§impl Default for EscapedString
impl Default for EscapedString
Source§fn default() -> EscapedString
fn default() -> EscapedString
Returns the “default value” for a type. Read more
Source§impl Display for EscapedString
impl Display for EscapedString
Source§impl FromStr for EscapedString
Parses an escaped string by lexer.escaped_string(|_| false)
.
impl FromStr for EscapedString
Parses an escaped string by lexer.escaped_string(|_| false)
.
Source§impl MaybeLiteral for EscapedString
impl MaybeLiteral for EscapedString
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>
Appends the literal representation of
self
to an extendable object. Read moreSource§fn to_string_if_literal(&self) -> Option<String>
fn to_string_if_literal(&self) -> Option<String>
Checks if
self
is literal and, if so, converts to a string.Source§impl PartialEq for EscapedString
impl PartialEq for EscapedString
Source§impl Unquote for EscapedString
Converts an escaped string into the string represented by the escape
sequences.
impl Unquote for EscapedString
Converts an escaped string into the string represented by the escape sequences.
Escape units that do not represent valid Unicode scalar values are ignored.
impl Eq for EscapedString
impl StructuralPartialEq for EscapedString
Auto Trait Implementations§
impl Freeze for EscapedString
impl RefUnwindSafe for EscapedString
impl Send for EscapedString
impl Sync for EscapedString
impl Unpin for EscapedString
impl UnwindSafe for EscapedString
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
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>
Converts
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>
Converts
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