pub struct Times(_);
Expand description
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§
source§impl From<RangeInclusive<u64>> for Times
impl From<RangeInclusive<u64>> for Times
source§fn from(r: RangeInclusive<u64>) -> Self
fn from(r: RangeInclusive<u64>) -> Self
Converts to this type from the input type.