pub struct RunnerExpectation {
pub expect_success: bool,
pub expected_egress: Option<Value>,
pub stdout_must_be_json: bool,
}Expand description
Defines the behaviour we expect from the runner invocation.
Fields§
§expect_success: bool§expected_egress: Option<Value>§stdout_must_be_json: boolImplementations§
Source§impl RunnerExpectation
impl RunnerExpectation
Sourcepub fn require_json_stdout(self) -> Self
pub fn require_json_stdout(self) -> Self
Require that stdout is valid JSON.
Sourcepub fn with_expected_egress(self, value: Value) -> Self
pub fn with_expected_egress(self, value: Value) -> Self
Provide an expected JSON fragment that must be contained in stdout.
Sourcepub fn allow_failure(self) -> Self
pub fn allow_failure(self) -> Self
Allow the runner to exit with a non-zero status.
Trait Implementations§
Source§impl Clone for RunnerExpectation
impl Clone for RunnerExpectation
Source§fn clone(&self) -> RunnerExpectation
fn clone(&self) -> RunnerExpectation
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 moreSource§impl Debug for RunnerExpectation
impl Debug for RunnerExpectation
Auto Trait Implementations§
impl Freeze for RunnerExpectation
impl RefUnwindSafe for RunnerExpectation
impl Send for RunnerExpectation
impl Sync for RunnerExpectation
impl Unpin for RunnerExpectation
impl UnwindSafe for RunnerExpectation
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