pub enum CompoundCommand {
If(IfCommand),
For(ForCommand),
ArithmeticFor(ArithmeticForCommand),
While(WhileCommand),
Until(UntilCommand),
Case(CaseCommand),
Select(SelectCommand),
Subshell(Vec<Command>),
BraceGroup(Vec<Command>),
Arithmetic(String),
Time(TimeCommand),
Conditional(Vec<Word>),
}Expand description
Compound commands (control structures).
Variants§
If(IfCommand)
If statement
For(ForCommand)
For loop
ArithmeticFor(ArithmeticForCommand)
C-style for loop: for ((init; cond; step))
While(WhileCommand)
While loop
Until(UntilCommand)
Until loop
Case(CaseCommand)
Case statement
Select(SelectCommand)
Select loop
Subshell(Vec<Command>)
Subshell (commands in parentheses)
BraceGroup(Vec<Command>)
Brace group
Arithmetic(String)
Arithmetic command ((expression))
Time(TimeCommand)
Time command - measure execution time
Conditional(Vec<Word>)
Conditional expression [[ … ]]
Trait Implementations§
Source§impl Clone for CompoundCommand
impl Clone for CompoundCommand
Source§fn clone(&self) -> CompoundCommand
fn clone(&self) -> CompoundCommand
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 moreAuto Trait Implementations§
impl Freeze for CompoundCommand
impl RefUnwindSafe for CompoundCommand
impl Send for CompoundCommand
impl Sync for CompoundCommand
impl Unpin for CompoundCommand
impl UnsafeUnpin for CompoundCommand
impl UnwindSafe for CompoundCommand
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