pub struct Context { /* private fields */ }
Expand description
Manages the context for expectations of static methods.
Expectations on this method will be validated and cleared when
the Context
object drops. The Context
object does not
provide any form of synchronization, so multiple tests that set
expectations on the same static method must provide their own.
Implementations§
source§impl Context
impl Context
sourcepub fn checkpoint(&self)
pub fn checkpoint(&self)
Verify that all current expectations for this method are satisfied and clear them.
sourcepub fn expect<'__mockall_lt>(&self) -> ExpectationGuard<'__mockall_lt>
pub fn expect<'__mockall_lt>(&self) -> ExpectationGuard<'__mockall_lt>
Create a new expectation for this method.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl !Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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