pub struct CommandSpec { /* private fields */ }Expand description
A program invocation with separate arguments and process options.
Implementations§
Source§impl CommandSpec
impl CommandSpec
Sourcepub fn current_dir(self, path: impl Into<PathBuf>) -> Self
pub fn current_dir(self, path: impl Into<PathBuf>) -> Self
Set the child working directory.
Sourcepub fn output_capacity(self, lines: usize) -> Self
pub fn output_capacity(self, lines: usize) -> Self
Set the maximum number of unread lines retained between polls.
A capacity of zero discards all lines while still counting them in
ProcessUpdate::dropped_lines.
Sourcepub fn arguments(&self) -> impl Iterator<Item = &OsStr>
pub fn arguments(&self) -> impl Iterator<Item = &OsStr>
Iterate over the separate process arguments.
Sourcepub fn working_directory(&self) -> Option<&Path>
pub fn working_directory(&self) -> Option<&Path>
Return the configured child working directory.
Sourcepub fn spawn(&self) -> Result<RunningProcess>
pub fn spawn(&self) -> Result<RunningProcess>
Spawn the child with piped stdout and stderr.
§Errors
Returns an I/O error when the process or output-reader threads cannot be spawned.
Trait Implementations§
Source§impl Clone for CommandSpec
impl Clone for CommandSpec
Source§fn clone(&self) -> CommandSpec
fn clone(&self) -> CommandSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandSpec
impl Debug for CommandSpec
impl Eq for CommandSpec
Source§impl Hash for CommandSpec
impl Hash for CommandSpec
Source§impl PartialEq for CommandSpec
impl PartialEq for CommandSpec
impl StructuralPartialEq for CommandSpec
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
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