Enum ArgMatcher

Source
pub enum ArgMatcher<I> {
    Fn(Box<dyn Fn(&I) -> bool + Send + 'static>),
    Eq {
        value: I,
        partial_eq: fn(&I, &I) -> bool,
    },
    Any,
    Never,
}

Variants§

§

Fn(Box<dyn Fn(&I) -> bool + Send + 'static>)

§

Eq

Fields

§value: I
§partial_eq: fn(&I, &I) -> bool
§

Any

§

Never

Trait Implementations§

Source§

impl<'a, O: PartialEq + MockableArg, I> From<&'a [I]> for ArgMatcher<Vec<O>>
where I: Into<ArgMatcher<O>> + Clone,

Source§

fn from(value: &'a [I]) -> Self

Converts to this type from the input type.
Source§

impl<'a, O: PartialEq + MockableArg, I, const N: usize> From<&'a [I; N]> for ArgMatcher<Vec<O>>
where I: Into<ArgMatcher<O>> + Clone,

Source§

fn from(value: &'a [I; N]) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for ArgMatcher<String>

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl<O: PartialEq + MockableArg, I, const N: usize> From<[I; N]> for ArgMatcher<Vec<O>>
where I: Into<ArgMatcher<O>> + Clone,

Source§

fn from(value: [I; N]) -> Self

Converts to this type from the input type.
Source§

impl<I: PartialEq + MockableArg> From<I> for ArgMatcher<I>

Source§

fn from(value: I) -> Self

Converts to this type from the input type.
Source§

impl<T: PartialEq + 'static> From<T> for ArgMatcher<SendWrapper<T>>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<I> Freeze for ArgMatcher<I>
where I: Freeze,

§

impl<I> !RefUnwindSafe for ArgMatcher<I>

§

impl<I> Send for ArgMatcher<I>
where I: Send,

§

impl<I> !Sync for ArgMatcher<I>

§

impl<I> Unpin for ArgMatcher<I>
where I: Unpin,

§

impl<I> !UnwindSafe for ArgMatcher<I>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> MockableArg for T
where T: Send + 'static,

Source§

impl<T> MockableRet for T
where T: Send + 'static,