pub struct HelperCommand { /* private fields */ }Expand description
Explicit command inputs. Environment inheritance is captured at construction;
env_clear and later overrides are preserved when crossing the helper boundary.
Implementations§
Source§impl HelperCommand
impl HelperCommand
pub fn new(program: impl AsRef<OsStr>) -> Self
pub fn arg(&mut self, value: impl AsRef<OsStr>) -> &mut Self
pub fn args<I, S>(&mut self, values: I) -> &mut Self
pub fn current_dir(&mut self, directory: impl AsRef<Path>) -> &mut Self
pub fn env_clear(&mut self) -> &mut Self
pub fn env( &mut self, key: impl AsRef<OsStr>, value: impl AsRef<OsStr>, ) -> &mut Self
pub fn env_remove(&mut self, key: impl AsRef<OsStr>) -> &mut Self
Sourcepub fn lock(&mut self, path: &Path, budget: Duration) -> &mut Self
pub fn lock(&mut self, path: &Path, budget: Duration) -> &mut Self
The helper acquires this lock before acknowledging its launch gate. It retains the lock through command termination and output capture.
pub fn run(&self, budget: Duration) -> TimedCommand
Sourcepub fn run_with_cli(&self, executable: &Path, budget: Duration) -> TimedCommand
pub fn run_with_cli(&self, executable: &Path, budget: Duration) -> TimedCommand
Supply the CLI explicitly when embedding this library without an installed CLI.
Trait Implementations§
Source§impl Clone for HelperCommand
impl Clone for HelperCommand
Auto Trait Implementations§
impl Freeze for HelperCommand
impl RefUnwindSafe for HelperCommand
impl Send for HelperCommand
impl Sync for HelperCommand
impl Unpin for HelperCommand
impl UnsafeUnpin for HelperCommand
impl UnwindSafe for HelperCommand
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