pub struct Output<StdOut, StdErr> {
pub stdout: Option<StdOut>,
pub stderr: Option<StdErr>,
}
Expand description
Path to files that store expected Command
stdout and stderr.
None
means expecting stdout or stderr to be empty. Note that providing an empty file does
not work and will resulting an “output is empty” assertion failure.
Expects empty output.
const EMPTY: OutputStr = OutputStr::empty();
assert!(EMPTY.stdout.is_none());
assert!(EMPTY.stderr.is_none());
#[must_use]
pub const fn stdout(stdout: StdOut) -> Self
[src]
Expects stdout to match the specified file and empty stderr.
const STDOUT_ONLY: OutputStr = OutputStr::stdout("foo/bar.stdout");
assert_eq!(STDOUT_ONLY.stdout.unwrap(), "foo/bar.stdout");
assert!(STDOUT_ONLY.stderr.is_none());
#[must_use]
pub const fn stderr(stderr: StdErr) -> Self
[src]
Expects stderr to match the specified file and empty stdout.
const STDERR_ONLY: OutputStr = OutputStr::stderr("foo/bar.stderr");
assert!(STDERR_ONLY.stdout.is_none());
assert_eq!(STDERR_ONLY.stderr.unwrap(), "foo/bar.stderr");
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.