pub enum Command<T> {
Job(T),
List(T),
}
Expand description
Represents any valid shell command.
Variants§
Job(T)
A command that runs asynchronously, that is, the shell will not wait
for it to exit before running the next command, e.g. foo &
.
List(T)
A list of and/or commands, e.g. foo && bar || baz
.
Trait Implementations§
Source§impl<T> From<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, AtomicTopLevelWord<T>, Redirect<AtomicTopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>, Arc<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>>>>>> for AtomicTopLevelCommand<T>
impl<T> From<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, AtomicTopLevelWord<T>, Redirect<AtomicTopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>, Arc<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>>>>>> for AtomicTopLevelCommand<T>
Source§fn from(
inner: Command<AtomicCommandList<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>>,
) -> Self
fn from( inner: Command<AtomicCommandList<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>>, ) -> Self
Converts to this type from the input type.
Source§impl<T> From<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, TopLevelWord<T>, Redirect<TopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>, Rc<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>>>>>> for TopLevelCommand<T>
impl<T> From<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, TopLevelWord<T>, Redirect<TopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>, Rc<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>>>>>> for TopLevelCommand<T>
Source§fn from(
inner: Command<CommandList<T, TopLevelWord<T>, TopLevelCommand<T>>>,
) -> Self
fn from( inner: Command<CommandList<T, TopLevelWord<T>, TopLevelCommand<T>>>, ) -> Self
Converts to this type from the input type.
Source§impl<T> PartialEq<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, AtomicTopLevelWord<T>, Redirect<AtomicTopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>, Arc<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>>>>>> for AtomicTopLevelCommand<T>where
T: PartialEq<T>,
impl<T> PartialEq<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, AtomicTopLevelWord<T>, Redirect<AtomicTopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>, Arc<CompoundCommand<CompoundCommandKind<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>, Redirect<AtomicTopLevelWord<T>>>>>>>>> for AtomicTopLevelCommand<T>where
T: PartialEq<T>,
Source§fn eq(
&self,
other: &Command<AtomicCommandList<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>>,
) -> bool
fn eq( &self, other: &Command<AtomicCommandList<T, AtomicTopLevelWord<T>, AtomicTopLevelCommand<T>>>, ) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<T> PartialEq<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, TopLevelWord<T>, Redirect<TopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>, Rc<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>>>>>> for TopLevelCommand<T>where
T: PartialEq<T>,
impl<T> PartialEq<Command<AndOrList<ListableCommand<PipeableCommand<T, Box<SimpleCommand<T, TopLevelWord<T>, Redirect<TopLevelWord<T>>>>, Box<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>, Rc<CompoundCommand<CompoundCommandKind<T, TopLevelWord<T>, TopLevelCommand<T>>, Redirect<TopLevelWord<T>>>>>>>>> for TopLevelCommand<T>where
T: PartialEq<T>,
Source§fn eq(
&self,
other: &Command<CommandList<T, TopLevelWord<T>, TopLevelCommand<T>>>,
) -> bool
fn eq( &self, other: &Command<CommandList<T, TopLevelWord<T>, TopLevelCommand<T>>>, ) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl<T: Eq> Eq for Command<T>
impl<T> StructuralPartialEq for Command<T>
Auto Trait Implementations§
impl<T> Freeze for Command<T>where
T: Freeze,
impl<T> RefUnwindSafe for Command<T>where
T: RefUnwindSafe,
impl<T> Send for Command<T>where
T: Send,
impl<T> Sync for Command<T>where
T: Sync,
impl<T> Unpin for Command<T>where
T: Unpin,
impl<T> UnwindSafe for Command<T>where
T: UnwindSafe,
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