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> Any for T
impl<T> Any for T
Source§fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
TODO: once 1.33.0 is the minimum supported compiler version, remove
Any::type_id_compat and use StdAny::type_id instead.
https://github.com/rust-lang/rust/issues/27745
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