#[non_exhaustive]pub enum Executable<'a> {
Simple(SimpleCmd<'a>),
Compound(CompoundCmd<'a>),
FuncDef(&'a str, CompoundCmd<'a>),
}Expand description
An executable unit: simple command, compound command, or function definition.
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.
Simple(SimpleCmd<'a>)
A simple command (possibly with assignments and redirections).
Compound(CompoundCmd<'a>)
A compound command (if, for, while, etc.).
FuncDef(&'a str, CompoundCmd<'a>)
A function definition: name() { body; }.
Trait Implementations§
Source§impl<'a> Clone for Executable<'a>
impl<'a> Clone for Executable<'a>
Source§fn clone(&self) -> Executable<'a>
fn clone(&self) -> Executable<'a>
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 moreSource§impl<'a> Debug for Executable<'a>
impl<'a> Debug for Executable<'a>
Source§impl<'a> PartialEq for Executable<'a>
impl<'a> PartialEq for Executable<'a>
impl<'a> Eq for Executable<'a>
impl<'a> StructuralPartialEq for Executable<'a>
Auto Trait Implementations§
impl<'a> Freeze for Executable<'a>
impl<'a> RefUnwindSafe for Executable<'a>
impl<'a> Send for Executable<'a>
impl<'a> Sync for Executable<'a>
impl<'a> Unpin for Executable<'a>
impl<'a> UnsafeUnpin for Executable<'a>
impl<'a> UnwindSafe for Executable<'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