Enum yash_syntax::syntax::CompoundCommand
source · [−]pub enum CompoundCommand {
Grouping(List),
Subshell(List),
For {
name: Word,
values: Option<Vec<Word>>,
body: List,
},
While {
condition: List,
body: List,
},
Until {
condition: List,
body: List,
},
If {
condition: List,
body: List,
elifs: Vec<ElifThen>,
else: Option<List>,
},
Case {
subject: Word,
items: Vec<CaseItem>,
},
}
Expand description
Command that contains other commands.
Variants
Grouping(List)
List as a command.
Subshell(List)
Command for executing commands in a subshell.
For
For loop.
While
While loop.
Until
Until loop.
If
If conditional construct.
Case
Case conditional construct.
Trait Implementations
sourceimpl Clone for CompoundCommand
impl Clone for CompoundCommand
sourcefn clone(&self) -> CompoundCommand
fn clone(&self) -> CompoundCommand
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CompoundCommand
impl Debug for CompoundCommand
sourceimpl Display for CompoundCommand
impl Display for CompoundCommand
sourceimpl FromStr for CompoundCommand
impl FromStr for CompoundCommand
sourceimpl PartialEq<CompoundCommand> for CompoundCommand
impl PartialEq<CompoundCommand> for CompoundCommand
sourcefn eq(&self, other: &CompoundCommand) -> bool
fn eq(&self, other: &CompoundCommand) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CompoundCommand) -> bool
fn ne(&self, other: &CompoundCommand) -> bool
This method tests for !=
.
impl Eq for CompoundCommand
impl StructuralEq for CompoundCommand
impl StructuralPartialEq for CompoundCommand
Auto Trait Implementations
impl !RefUnwindSafe for CompoundCommand
impl !Send for CompoundCommand
impl !Sync for CompoundCommand
impl Unpin for CompoundCommand
impl !UnwindSafe for CompoundCommand
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more