[][src]Trait mockall::examples::Foo

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

Mock of a basic trait with several kinds of method.

It is mocked by the MockFoo struct.

Required methods

pub fn foo(&self, x: i32, y: i16) -> i32[src]

A method with a 'static return type

pub fn bar(&self, x: i32) -> &i32[src]

A method returning a reference

pub fn baz(&mut self, x: i32) -> &mut i32[src]

A method returning a mutable reference

pub fn bean(&self) -> &'static i32[src]

A method returning a 'static reference

pub fn bang(x: i32) -> i32[src]

A static method

Loading content...

Implementors

impl Foo for MockFoo[src]

Mock of a basic trait with several kinds of method.

It is mocked by the MockFoo struct.

pub fn foo(&self, x: i32, y: i16) -> i32[src]

A method with a 'static return type

pub fn bar(&self, x: i32) -> &i32[src]

A method returning a reference

pub fn baz(&mut self, x: i32) -> &mut i32[src]

A method returning a mutable reference

pub fn bean(&self) -> &'static i32[src]

A method returning a 'static reference

pub fn bang(x: i32) -> i32[src]

A static method

Loading content...