[][src]Trait mockall_examples::Foo

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

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

A method with a 'static return type

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

A method returning a reference

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

A method returning a mutable reference

fn bean(&self) -> &'static i32

A method returning a 'static reference

fn bang(x: i32) -> i32

A static method

Loading content...

Implementors

impl Foo for MockFoo[src]

Loading content...