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

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; }

Mock of a basic trait with several kinds of method.

It is mocked by the MockFoo struct.

Required methods

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

A method with a 'static return type

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

A method returning a reference

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

A method returning a mutable reference

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

A method returning a 'static reference

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.

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

A method with a 'static return type

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

A method returning a reference

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

A method returning a mutable reference

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

A method returning a 'static reference

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

A static method

Loading content...