Struct run_make_support::command::CompletedProcess
source · pub struct CompletedProcess {
output: Output,
}Expand description
Represents the result of an executed process.
The various assert_ helper methods should preferably be used for
checking the contents of stdout/stderr.
Fields§
§output: OutputImplementations§
source§impl CompletedProcess
impl CompletedProcess
pub fn stdout_utf8(&self) -> String
pub fn stderr_utf8(&self) -> String
pub fn status(&self) -> ExitStatus
sourcepub fn assert_stdout_equals<S: AsRef<str>>(&self, expected: S) -> &Self
pub fn assert_stdout_equals<S: AsRef<str>>(&self, expected: S) -> &Self
Checks that trimmed stdout matches trimmed expected.
sourcepub fn assert_stdout_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self
pub fn assert_stdout_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self
Checks that stdout does not contain unexpected.
sourcepub fn assert_stdout_contains<S: AsRef<str>>(&self, expected: S) -> &Self
pub fn assert_stdout_contains<S: AsRef<str>>(&self, expected: S) -> &Self
Checks that stdout contains expected.
sourcepub fn assert_stderr_equals<S: AsRef<str>>(&self, expected: S) -> &Self
pub fn assert_stderr_equals<S: AsRef<str>>(&self, expected: S) -> &Self
Checks that trimmed stderr matches trimmed expected.
sourcepub fn assert_stderr_contains<S: AsRef<str>>(&self, expected: S) -> &Self
pub fn assert_stderr_contains<S: AsRef<str>>(&self, expected: S) -> &Self
Checks that stderr contains expected.
sourcepub fn assert_stderr_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self
pub fn assert_stderr_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self
Checks that stderr does not contain unexpected.
pub fn assert_exit_code(&self, code: i32) -> &Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompletedProcess
impl RefUnwindSafe for CompletedProcess
impl Send for CompletedProcess
impl Sync for CompletedProcess
impl Unpin for CompletedProcess
impl UnwindSafe for CompletedProcess
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes