pub enum Run {
Command(CommandWithArgs),
BackgroundCommand(CommandWithArgs),
Pipe(Vec<Run>),
Sequence(Vec<Run>),
And(Vec<Run>),
Or(Vec<Run>),
Subshell(Box<Run>),
Empty,
}
Expand description
Command(s) ready to run with context.
Variants§
Command(CommandWithArgs)
BackgroundCommand(CommandWithArgs)
Pipe(Vec<Run>)
Sequence(Vec<Run>)
And(Vec<Run>)
Or(Vec<Run>)
Subshell(Box<Run>)
Empty
Implementations§
Source§impl Run
impl Run
Sourcepub fn push_run(self, new_run: Run) -> Self
pub fn push_run(self, new_run: Run) -> Self
Push a new Run onto the Run. If it is not the first command will add to or create a sequence.
Sourcepub fn push_pipe(self, new_run: Run) -> Self
pub fn push_pipe(self, new_run: Run) -> Self
Push Run onto an existing or create a new pipe sequence.
Sourcepub fn push_sequence(self, new_run: Run) -> Self
pub fn push_sequence(self, new_run: Run) -> Self
Push new Run onto an existing or create a new sequence.
Sourcepub fn push_and(self, new_run: Run) -> Self
pub fn push_and(self, new_run: Run) -> Self
Push new Run onto an existing or create a new AND sequence.
Sourcepub fn push_or(self, new_run: Run) -> Self
pub fn push_or(self, new_run: Run) -> Self
Push new Run onto an existing or create a new OR sequence.
Sourcepub fn push_stdin_front(&mut self, fd: Option<FileDesc>)
pub fn push_stdin_front(&mut self, fd: Option<FileDesc>)
If fd is Some value then put it at the front of the redir queue for the first command in the Run.
Sourcepub fn push_stdout_front(&mut self, fd: Option<FileDesc>)
pub fn push_stdout_front(&mut self, fd: Option<FileDesc>)
If fd is Some value then put it at the front of the redir queue for the last command in the Run.
pub fn fds_to_internal(&mut self, fd_set: &HashSet<FileDesc>)
Sourcepub fn get_internal_fds(&self) -> HashSet<FileDesc>
pub fn get_internal_fds(&self) -> HashSet<FileDesc>
Return a set of all the ‘internal’ file descriptors (for pipes etc).
Sourcepub fn push_arg_end(&mut self, arg: Arg)
pub fn push_arg_end(&mut self, arg: Arg)
If fd is Some value then put it at the front of the redir queue for the last command in the Run.
Sourcepub fn extend_redirs_end(&mut self, redirs: &Redirects)
pub fn extend_redirs_end(&mut self, redirs: &Redirects)
If fd is Some value then put it at the front of the redir queue for the last command in the Run.