Enum cucumber::event::response::InvokeResponse [] [src]

pub enum InvokeResponse {
    Pending(String),
    Success,
    Fail(FailMessage),
}

The low level type capturing the possible outcomes a step invocation may have.

Typical instantiation of this type will be done using the helpers provided.

This type is designed to be heavily composable, as it is the form many operations against state will take. If it doesn't suit a particular use case, that use case was probably not conceived of and should be included!

Variants

Pending(String)SuccessFail(FailMessage)

Methods

impl InvokeResponse
[src]

fn pending_from_str(val: &str) -> InvokeResponse

Build an InvokeResponse::Pending with a message

fn fail_from_str(val: &str) -> InvokeResponse

Build an InvokeResponse::Fail with a message

fn check_eq<T: PartialEq + Debug>(first: T, second: T) -> InvokeResponse

Return an InvokeResponse reflecting an equality check

fn check_not_eq<T: PartialEq + Debug>(first: T, second: T) -> InvokeResponse

Return an InvokeResponse reflecting a negative equality check

fn check(b: bool) -> InvokeResponse

Return an InvokeResponse reflecting a boolean outcome

fn expect(b: bool, fail_msg: &str) -> InvokeResponse

Return an InvokeResponse reflecting a boolean outcome with a custom message

fn and(self, other: InvokeResponse) -> InvokeResponse

Compose InvokeResponses with "and" logic, exiting on non-success

fn or(self, other: InvokeResponse) -> InvokeResponse

Compose InvokeResponses with "or" logic, exiting on success

Trait Implementations

impl Debug for InvokeResponse
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for InvokeResponse
[src]

fn clone(&self) -> InvokeResponse

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl PartialEq for InvokeResponse
[src]

fn eq(&self, __arg_0: &InvokeResponse) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &InvokeResponse) -> bool

This method tests for !=.

impl Eq for InvokeResponse
[src]