Struct mockall::examples::mock_ffi::__ffi_func::Context[][src]

#[must_use = "Context only serves to create expectations"]pub struct Context { /* fields omitted */ }
👎 Deprecated since 0.9.0:

Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }

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

impl Context[src]

pub fn checkpoint(&self)[src]

👎 Deprecated since 0.9.0:

Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }

Verify that all current expectations for this method are satisfied and clear them.

pub fn expect<'__mockall_lt>(&self) -> ExpectationGuard<'__mockall_lt>[src]

👎 Deprecated since 0.9.0:

Using automock directly on an extern block is deprecated. Instead, wrap the extern block in a module, and automock that, like #[automoock] mod ffi { extern "C" { fn foo ... } }

Create a new expectation for this method.

Trait Implementations

impl Default for Context[src]

impl Drop for Context[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.