pub struct LinuxCommand { /* private fields */ }Expand description
A program to run inside a named distribution, as a literal argument vector.
Implementations§
Source§impl LinuxCommand
impl LinuxCommand
Sourcepub fn new(distribution: impl Into<String>, program: impl Into<String>) -> Self
pub fn new(distribution: impl Into<String>, program: impl Into<String>) -> Self
Runs program in distribution, as root, with no arguments.
Sourcepub fn with_input(self, input: ChildInput) -> Self
pub fn with_input(self, input: ChildInput) -> Self
Gives the Linux process something on its stdin.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Replaces the default deadline.
Sourcepub fn with_limits(self, limits: OutputLimits) -> Self
pub fn with_limits(self, limits: OutputLimits) -> Self
Replaces the default capture bounds.
Sourcepub fn distribution(&self) -> &str
pub fn distribution(&self) -> &str
The distribution this runs in.
Sourcepub fn wsl_arguments(&self) -> Vec<String>
pub fn wsl_arguments(&self) -> Vec<String>
The argument vector handed to wsl.exe.
The single place the invocation shape is written down, and therefore the single thing a test has to assert to know that no shell is involved anywhere.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinuxCommand
impl RefUnwindSafe for LinuxCommand
impl Send for LinuxCommand
impl Sync for LinuxCommand
impl Unpin for LinuxCommand
impl UnsafeUnpin for LinuxCommand
impl UnwindSafe for LinuxCommand
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