#[non_exhaustive]pub enum CmdPrefix<'a> {
Assign(&'a str, Option<Word<'a>>),
ArrayAssign(&'a str, Vec<Word<'a>>),
ArrayAppend(&'a str, Vec<Word<'a>>),
Redirect(Redir<'a>),
}Expand description
A prefix element: variable assignment or redirection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Assign(&'a str, Option<Word<'a>>)
NAME=value — scalar assignment.
ArrayAssign(&'a str, Vec<Word<'a>>)
arr=(word ...) — array assignment.
ArrayAppend(&'a str, Vec<Word<'a>>)
arr+=(word ...) — array append.
Redirect(Redir<'a>)
An I/O redirection.
Trait Implementations§
impl<'a> Eq for CmdPrefix<'a>
impl<'a> StructuralPartialEq for CmdPrefix<'a>
Auto Trait Implementations§
impl<'a> Freeze for CmdPrefix<'a>
impl<'a> RefUnwindSafe for CmdPrefix<'a>
impl<'a> Send for CmdPrefix<'a>
impl<'a> Sync for CmdPrefix<'a>
impl<'a> Unpin for CmdPrefix<'a>
impl<'a> UnsafeUnpin for CmdPrefix<'a>
impl<'a> UnwindSafe for CmdPrefix<'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