Struct wiremock::Times[][src]

pub struct Times(_);

Specify how many times we expect a Mock to match via expect. It is used to set expectations on the usage of a Mock in a test case.

You can either specify an exact value, e.g.

use wiremock::Times;

let times: Times = 10.into();

or a range

use wiremock::Times;

// Between 10 and 15 (not included) times
let times: Times = (10..15).into();
// Between 10 and 15 (included) times
let times: Times = (10..=15).into();
// At least 10 times
let times: Times = (10..).into();
// Strictly less than 15 times
let times: Times = (..15).into();
// Strictly less than 16 times
let times: Times = (..=15).into();

Trait Implementations

impl Clone for Times[src]

impl Debug for Times[src]

impl Display for Times[src]

impl From<Range<u64>> for Times[src]

impl From<RangeFrom<u64>> for Times[src]

impl From<RangeInclusive<u64>> for Times[src]

impl From<RangeTo<u64>> for Times[src]

impl From<RangeToInclusive<u64>> for Times[src]

impl From<u64> for Times[src]

Auto Trait Implementations

impl RefUnwindSafe for Times

impl Send for Times

impl Sync for Times

impl Unpin for Times

impl UnwindSafe for Times

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,