pub trait ProjectedResultExpectations<'e, T, E>{
// Required methods
fn to_be_ok_and(
self,
) -> ProjectedExpectationsBuilder<'e, Self, Result<T, E>, T>
where Self: Sized + ExpectationBuilder<'e, Value = Result<T, E>>;
fn to_be_err_and(
self,
) -> ProjectedExpectationsBuilder<'e, Self, Result<T, E>, E>
where Self: Sized + ExpectationBuilder<'e, Value = Result<T, E>>;
}Required Methods§
Sourcefn to_be_ok_and(self) -> ProjectedExpectationsBuilder<'e, Self, Result<T, E>, T>
fn to_be_ok_and(self) -> ProjectedExpectationsBuilder<'e, Self, Result<T, E>, T>
Expect the Result to be Ok and then chain into further expectations
let result: Result<i32, &str> = Ok(42);
expect(result).to_be_ok_and().to_equal(42);asserts that the Result is Ok and the chained expectations hold for the Ok value
Sourcefn to_be_err_and(
self,
) -> ProjectedExpectationsBuilder<'e, Self, Result<T, E>, E>
fn to_be_err_and( self, ) -> ProjectedExpectationsBuilder<'e, Self, Result<T, E>, E>
Expect the Result to be Err and then chain into further expectations
let result: Result<i32, &str> = Err("Error message");
expect(result).to_be_err_and().to_equal("Error message");asserts that the Result is Err and the chained expectations hold for the Err value