pub enum LiteralPart<'a> {
String(Cow<'a, str>),
Escaped(char),
LineContinuation,
}Expand description
A element of literal words.
Variants§
String(Cow<'a, str>)
A string ("<text>").
Escaped(char)
An escaped character ("\\<char>").
LineContinuation
A tag for discard newlines ("\\\n").
Implementations§
Source§impl LiteralPart<'_>
impl LiteralPart<'_>
Sourcepub fn should_escape(ch: char) -> bool
pub fn should_escape(ch: char) -> bool
Returns if a character should be escaped when used in double-quoted words.
Trait Implementations§
Source§impl<'a> Clone for LiteralPart<'a>
impl<'a> Clone for LiteralPart<'a>
Source§fn clone(&self) -> LiteralPart<'a>
fn clone(&self) -> LiteralPart<'a>
Returns a duplicate 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<'a> Debug for LiteralPart<'a>
impl<'a> Debug for LiteralPart<'a>
Source§impl Display for LiteralPart<'_>
impl Display for LiteralPart<'_>
Source§impl<'a> Hash for LiteralPart<'a>
impl<'a> Hash for LiteralPart<'a>
Source§impl<'a> PartialEq for LiteralPart<'a>
impl<'a> PartialEq for LiteralPart<'a>
impl<'a> Eq for LiteralPart<'a>
impl<'a> StructuralPartialEq for LiteralPart<'a>
Auto Trait Implementations§
impl<'a> Freeze for LiteralPart<'a>
impl<'a> RefUnwindSafe for LiteralPart<'a>
impl<'a> Send for LiteralPart<'a>
impl<'a> Sync for LiteralPart<'a>
impl<'a> Unpin for LiteralPart<'a>
impl<'a> UnwindSafe for LiteralPart<'a>
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