pub struct P4Command<'a> { /* private fields */ }Expand description
Builder-style interface for running a single p4 command.
Obtain one via P4Cli::command() and chain configuration calls
before calling run.
Implementations§
Source§impl<'a> P4Command<'a>
impl<'a> P4Command<'a>
Sourcepub fn args(&mut self, args: &[impl AsRef<OsStr>]) -> &mut Self
pub fn args(&mut self, args: &[impl AsRef<OsStr>]) -> &mut Self
Append all arguments from a slice.
Sourcepub fn timeout(&mut self, timeout: Duration) -> &mut Self
pub fn timeout(&mut self, timeout: Duration) -> &mut Self
Maximum wall-clock time the process is allowed to run. When exceeded the process is killed.
Sourcepub fn cwd(&mut self, path: impl Into<PathBuf>) -> &mut Self
pub fn cwd(&mut self, path: impl Into<PathBuf>) -> &mut Self
Working directory for the child process.
Sourcepub fn env(
&mut self,
key: impl Into<OsString>,
val: impl Into<OsString>,
) -> &mut Self
pub fn env( &mut self, key: impl Into<OsString>, val: impl Into<OsString>, ) -> &mut Self
Set an environment variable for the child process.
Auto Trait Implementations§
impl<'a> Freeze for P4Command<'a>
impl<'a> RefUnwindSafe for P4Command<'a>
impl<'a> Send for P4Command<'a>
impl<'a> Sync for P4Command<'a>
impl<'a> Unpin for P4Command<'a>
impl<'a> UnsafeUnpin for P4Command<'a>
impl<'a> UnwindSafe for P4Command<'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