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

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 #[automock] mod ffi { extern “C” { fn foo … } }

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

👎 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 #[automock] mod ffi { extern “C” { fn foo … } }

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

👎 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 #[automock] mod ffi { extern “C” { fn foo … } }

Create a new expectation for this method.

Trait Implementations

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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 Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.