pub struct CommandWithArgs { /* private fields */ }
Expand description
An individual command with args.
Implementations§
Source§impl CommandWithArgs
impl CommandWithArgs
Sourcepub fn push_arg(&mut self, arg: Arg)
pub fn push_arg(&mut self, arg: Arg)
Push a new arg onto the command, the first “arg” is the command itself.
Sourcepub fn push_env_var_arg(&mut self, arg: OsString)
pub fn push_env_var_arg(&mut self, arg: OsString)
Push a new env var arg onto the command, the first “arg” is the command itself.
Sourcepub fn push_run_arg(&mut self, run: Run)
pub fn push_run_arg(&mut self, run: Run)
Push a new env var arg onto the command, the first “arg” is the command itself.
Sourcepub fn command(&self, jobs: &mut Jobs) -> Option<Result<OsString>>
pub fn command(&self, jobs: &mut Jobs) -> Option<Result<OsString>>
Command name, None if no command name set (args are empty).
Sourcepub fn args_iter(&self) -> CommandArgs<'_> ⓘ
pub fn args_iter(&self) -> CommandArgs<'_> ⓘ
Iterator over the arguments for the command.
Sourcepub fn set_stdios(&mut self, stdios: Redirects)
pub fn set_stdios(&mut self, stdios: Redirects)
Set the stdio redirect stack for this command.
Sourcepub fn extend_stdios(&mut self, stdios: &Redirects)
pub fn extend_stdios(&mut self, stdios: &Redirects)
Extend the redirect stack for this command with stdio.
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 this command.
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 this command.
Sourcepub fn process_redirects(
&self,
jobs: &mut Jobs,
) -> Result<HashSet<FileDesc>, Error>
pub fn process_redirects( &self, jobs: &mut Jobs, ) -> Result<HashSet<FileDesc>, Error>
Process redirects.
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).
Trait Implementations§
Source§impl Clone for CommandWithArgs
impl Clone for CommandWithArgs
Source§fn clone(&self) -> CommandWithArgs
fn clone(&self) -> CommandWithArgs
Returns a copy 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 Debug for CommandWithArgs
impl Debug for CommandWithArgs
Source§impl Default for CommandWithArgs
impl Default for CommandWithArgs
Auto Trait Implementations§
impl Freeze for CommandWithArgs
impl RefUnwindSafe for CommandWithArgs
impl Send for CommandWithArgs
impl Sync for CommandWithArgs
impl Unpin for CommandWithArgs
impl UnwindSafe for CommandWithArgs
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