Struct fixture::vm::GuestProcess
source · pub struct GuestProcess {
command: String,
timeout: Duration,
}
Expand description
Represents a command running in the guest. See TestVm::exec_in_guest_async()
Fields§
§command: String
§timeout: Duration
Implementations§
source§impl GuestProcess
impl GuestProcess
pub fn with_timeout(self, duration: Duration) -> Self
sourcepub fn wait_ok(self, vm: &mut TestVm) -> Result<ProgramExit>
pub fn wait_ok(self, vm: &mut TestVm) -> Result<ProgramExit>
Waits for the process to finish execution and return ExitStatus. Will fail on a non-zero exit code.
sourcepub fn wait_result(self, vm: &mut TestVm) -> Result<ProgramExit>
pub fn wait_result(self, vm: &mut TestVm) -> Result<ProgramExit>
Same as wait_ok
but will return a ExitStatus instead of failing on a non-zero exit code,
will only fail when cannot receive output from guest.
Auto Trait Implementations§
impl RefUnwindSafe for GuestProcess
impl Send for GuestProcess
impl Sync for GuestProcess
impl Unpin for GuestProcess
impl UnwindSafe for GuestProcess
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