Struct mockall::examples::MockBoo [−][src]
pub struct MockBoo { /* fields omitted */ }
Expand description
Mock of a struct
Structs can be mocked with mock!
.
Their mock methods have an identical API to the methods generated by
#[automock]
.
Implementations
Validate that all current expectations for all methods have been satisfied, and discard them.
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
👎 Deprecated since 0.9.0: Deprecated mock! syntax. Instead of “trait X”, write “impl X for Y”. See PR #205
👎 Deprecated since 0.9.0:
Deprecated mock! syntax. Instead of “trait X”, write “impl X for Y”. See PR #205
Create an Expectation
for mocking the bah
method
Trait Implementations
An implementation of a trait on a mocked struct
Auto Trait Implementations
impl RefUnwindSafe for MockBoo
impl UnwindSafe for MockBoo