pub enum WordPart {
Lit(String),
Escape(char),
SQuote(String),
DQuote(Word),
CmdSub(Script),
ProcSub(Script),
Backtick(String),
Arith(Word),
}Variants§
Lit(String)
Escape(char)
SQuote(String)
DQuote(Word)
CmdSub(Script)
ProcSub(Script)
Backtick(String)
Arith(Word)
$(( … )). Holds a Word, not raw text, because the body is not opaque: a $( ) inside it
RUNS. The arithmetic itself is inert — it can only produce a number, and bash, zsh and dash
all evaluate $((id)) to 0 rather than executing id — so the inner command is what
decides, and storing parts is what lets the ordinary substitution walkers reach it.
Trait Implementations§
impl Eq for WordPart
impl StructuralPartialEq for WordPart
Auto Trait Implementations§
impl Freeze for WordPart
impl RefUnwindSafe for WordPart
impl Send for WordPart
impl Sync for WordPart
impl Unpin for WordPart
impl UnsafeUnpin for WordPart
impl UnwindSafe for WordPart
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.