pub struct MockClock { /* private fields */ }
Expand description
Implementations§
source§impl MockClock
impl MockClock
sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new
method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new
method can still be called
like <MockX as TraitY>::new
source§impl MockClock
impl MockClock
sourcepub fn expect_local(&mut self) -> &mut Expectation
pub fn expect_local(&mut self) -> &mut Expectation
Create an Expectation
for mocking the local
method
sourcepub fn expect_utc(&mut self) -> &mut Expectation
pub fn expect_utc(&mut self) -> &mut Expectation
Create an Expectation
for mocking the utc
method
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockClock
impl RefUnwindSafe for MockClock
impl Send for MockClock
impl Sync for MockClock
impl Unpin for MockClock
impl UnwindSafe for MockClock
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