pub struct TestCommandBuilder<'a> { /* private fields */ }Expand description
Builder for TestCommand.
Implementations§
Source§impl<'a> TestCommandBuilder<'a>
impl<'a> TestCommandBuilder<'a>
Sourcepub fn args(&mut self, value: &'a [&'a str]) -> &mut Self
pub fn args(&mut self, value: &'a [&'a str]) -> &mut Self
Optional: The arguments to pass to the binary
Sourcepub fn expected_rc(&mut self, value: i32) -> &mut Self
pub fn expected_rc(&mut self, value: i32) -> &mut Self
Optional: The expected return code
Sourcepub fn expected_stdout(&mut self, value: &'a str) -> &mut Self
pub fn expected_stdout(&mut self, value: &'a str) -> &mut Self
Optional: Expected string to find in stdout
Sourcepub fn expected_stderr(&mut self, value: &'a str) -> &mut Self
pub fn expected_stderr(&mut self, value: &'a str) -> &mut Self
Optional: Expected string to find in stderr
Sourcepub fn build(&self) -> Result<TestCommand<'a>, TestCommandBuilderError>
pub fn build(&self) -> Result<TestCommand<'a>, TestCommandBuilderError>
Trait Implementations§
Source§impl<'a> Clone for TestCommandBuilder<'a>
impl<'a> Clone for TestCommandBuilder<'a>
Source§fn clone(&self) -> TestCommandBuilder<'a>
fn clone(&self) -> TestCommandBuilder<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for TestCommandBuilder<'a>
impl<'a> RefUnwindSafe for TestCommandBuilder<'a>
impl<'a> Send for TestCommandBuilder<'a>
impl<'a> Sync for TestCommandBuilder<'a>
impl<'a> Unpin for TestCommandBuilder<'a>
impl<'a> UnwindSafe for TestCommandBuilder<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more