Trait mockall::examples::Foo

source ·
pub trait Foo {
    fn foo(&self, x: i32, y: i16) -> i32;
    fn bar(&self, x: i32) -> &i32;
    fn baz(&mut self, x: i32) -> &mut i32;
    fn bean(&self) -> &'static i32;
    fn bang(x: i32) -> i32;
}
Expand description

Mock of a basic trait with several kinds of method.

It is mocked by the MockFoo struct.

Required Methods§

A method with a 'static return type

A method returning a reference

A method returning a mutable reference

A method returning a 'static reference

A static method

Implementors§

Mock of a basic trait with several kinds of method.

It is mocked by the MockFoo struct.