#[non_exhaustive]pub enum DoubleQuotedTextKind {
HereDoc,
Prompt,
WordInHereDocOrPrompt,
WordInDoubleQuotes,
}Expand description
A kind of double-quoted text whose quotes are elsewhere.
See parse_double_quoted_text. In all of them only $, ` and \ are
special and ' is an ordinary character. They differ in what else a backslash
escapes, whether " is text, and whether $'...' and $"..." are quotes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
HereDoc
The body of a here document: a backslash escapes only $, ` and \, and
", $'...' and $"..." are text.
Prompt
A prompt string (PS1 and its like): as a here document body, except that \"
stands for " and a backslash and the newline after it yield nothing.
WordInHereDocOrPrompt
The word of a parameter expansion (${param:-word} and its like) within a here
document body or a prompt: as a prompt, except that its own " are removed
rather than being text, \} stands for }, and between a pair of its quotes a
backslash escapes any character.
WordInDoubleQuotes
The word of such a parameter expansion within double quotes
("${param:-word}"): as Self::WordInHereDocOrPrompt, except that outside
the word’s own quotes $'...' is ANSI-C quoted text and $"..." a
double-quoted string to translate.
Implementations§
Trait Implementations§
Source§impl Clone for DoubleQuotedTextKind
impl Clone for DoubleQuotedTextKind
impl Copy for DoubleQuotedTextKind
Source§impl Debug for DoubleQuotedTextKind
impl Debug for DoubleQuotedTextKind
impl Eq for DoubleQuotedTextKind
Source§impl PartialEq for DoubleQuotedTextKind
impl PartialEq for DoubleQuotedTextKind
impl StructuralPartialEq for DoubleQuotedTextKind
Auto Trait Implementations§
impl Forget for DoubleQuotedTextKind
impl Freeze for DoubleQuotedTextKind
impl Move for DoubleQuotedTextKind
impl RefUnwindSafe for DoubleQuotedTextKind
impl Send for DoubleQuotedTextKind
impl Sync for DoubleQuotedTextKind
impl Unpin for DoubleQuotedTextKind
impl UnsafeUnpin for DoubleQuotedTextKind
impl UnwindSafe for DoubleQuotedTextKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.