pub struct Times(/* private fields */);
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.
Auto Trait Implementations§
impl Freeze for Times
impl RefUnwindSafe for Times
impl Send for Times
impl Sync for Times
impl Unpin for Times
impl UnwindSafe for Times
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)