pub struct BeOkMatcher<T, E> { /* private fields */ }
Expand description

The matcher for be_ok and be_err.

Implementations§

source§

impl<T, E> BeOkMatcher<T, E>

source

pub fn new() -> Self

Create a new BeOkMatcher.

Trait Implementations§

source§

impl<T: Debug, E: Debug> Debug for BeOkMatcher<T, E>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, E> Default for BeOkMatcher<T, E>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T, E> TransformMatch for BeOkMatcher<T, E>

§

type In = Result<T, E>

The type of the “actual” value passed into the matcher by expect!.
§

type PosOut = T

The output type of the matcher that is passed to subsequent matchers in the chain. Read more
§

type NegOut = E

The output type of the matcher in the negative case. Read more
§

type PosFail = Expectation<Result<T, E>>

The failure output that is passed to the formatter. Read more
§

type NegFail = Expectation<Result<T, E>>

The failure output of the matcher in the negative case. Read more
source§

fn match_pos( self, actual: Self::In ) -> Result<MatchOutcome<Self::PosOut, Self::PosFail>>

The function called to test whether a value matches. Read more
source§

fn match_neg( self, actual: Self::In ) -> Result<MatchOutcome<Self::NegOut, Self::NegFail>>

The function called to test whether a value matches in the negative case. Read more

Auto Trait Implementations§

§

impl<T, E> RefUnwindSafe for BeOkMatcher<T, E>where E: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, E> Send for BeOkMatcher<T, E>where E: Send, T: Send,

§

impl<T, E> Sync for BeOkMatcher<T, E>where E: Sync, T: Sync,

§

impl<T, E> Unpin for BeOkMatcher<T, E>where E: Unpin, T: Unpin,

§

impl<T, E> UnwindSafe for BeOkMatcher<T, E>where E: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.