Skip to main content

ExpectationBuilder

Trait ExpectationBuilder 

Source
pub trait ExpectationBuilder<'e> {
    type Value: Debug + 'e;

    // Required method
    fn to_pass(self, expectation: impl Expectation<Self::Value> + 'e) -> Self;
}
Expand description

Trait to enable fluent building of expectations

Required Associated Types§

Source

type Value: Debug + 'e

Target value type for this builder

Required Methods§

Source

fn to_pass(self, expectation: impl Expectation<Self::Value> + 'e) -> Self

Expect the value to pass an expectation This is intended to be used in extension methods to add expectations to the builder

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'e, P, T, U> ExpectationBuilder<'e> for ProjectedExpectationsBuilder<'e, P, T, U>
where T: Debug + 'e, U: Debug + 'e, P: ExpectationBuilder<'e, Value = T>,

Source§

type Value = U

Source§

impl<'e, T> ExpectationBuilder<'e> for ExpectationList<'e, T>
where T: Debug + 'e,

Source§

type Value = T

Source§

impl<'e, T: Debug + 'e> ExpectationBuilder<'e> for RootExpectations<'e, T>

Source§

type Value = T