pub struct TestDaemonCommand { /* private fields */ }Expand description
Command builder whose only spawn operation returns an owned TestDaemon.
It enforces scratch-root isolation and keeps the child tied to a lifetime pipe.
Unix consumers require python3 on PATH to run the process-lifetime watcher.
Implementations§
Source§impl TestDaemonCommand
impl TestDaemonCommand
pub fn new(program: &Path, scratch: &Path) -> Self
pub fn env( &mut self, key: impl AsRef<OsStr>, value: impl AsRef<OsStr>, ) -> &mut Self
Sourcepub fn fenced_root(&mut self, variable: &str, directory: &str) -> &mut Self
pub fn fenced_root(&mut self, variable: &str, directory: &str) -> &mut Self
Redirect an additional directory variable into a plain subdirectory of
scratch. It is reapplied at spawn, so .env and .env_remove cannot
bypass it. Panics for a variable the fence already sets (HOME, the XDG
directories, TMPDIR) and for a directory name that is not a single plain
path component.
pub fn arg(&mut self, arg: impl AsRef<OsStr>) -> &mut Self
pub fn args<I, S>(&mut self, args: I) -> &mut Self
pub fn env_remove(&mut self, key: impl AsRef<OsStr>) -> &mut Self
pub fn stdout(&mut self, stdio: impl Into<Stdio>) -> &mut Self
pub fn stderr(&mut self, stdio: impl Into<Stdio>) -> &mut Self
pub fn kill_on_drop(&mut self, enabled: bool) -> &mut Self
pub fn spawn(&mut self) -> Result<TestDaemon>
Auto Trait Implementations§
impl !RefUnwindSafe for TestDaemonCommand
impl !UnwindSafe for TestDaemonCommand
impl Freeze for TestDaemonCommand
impl Send for TestDaemonCommand
impl Sync for TestDaemonCommand
impl Unpin for TestDaemonCommand
impl UnsafeUnpin for TestDaemonCommand
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