pub enum Command {
Simple(SimpleCommand),
Pipeline(Pipeline),
List(CommandList),
Compound(CompoundCommand, Vec<Redirect>),
Function(FunctionDef),
}Expand description
A single command in the script.
Variants§
Simple(SimpleCommand)
A simple command (e.g., echo hello)
Pipeline(Pipeline)
A pipeline (e.g., ls | grep foo)
List(CommandList)
A command list (e.g., a && b || c)
Compound(CompoundCommand, Vec<Redirect>)
A compound command (if, for, while, case, etc.) with optional redirections
Function(FunctionDef)
A function definition
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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