-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathlib.rs
More file actions
40 lines (32 loc) · 950 Bytes
/
lib.rs
File metadata and controls
40 lines (32 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// vim: tw=80
//! Examples of mock objects and their generated methods.
//!
//! This crate only exists to document the autogenerated methods of the
//! [`Mockall`](https://docs.rs/mockall/latest/mockall)
//! crate. You should never depend on this crate.
//
#[cfg(doc)]
use mockall::*;
/// A basic trait with several kinds of method.
///
/// It is mocked by the [`MockFoo`](struct.MockFoo.html) struct.
#[cfg(doc)]
#[automock]
pub trait Foo {
/// A method with a `'static` return type
fn foo(&self, x: i32, y: i16) -> i32;
/// A method returning a reference
fn bar(&self, x: i32) -> &i32;
/// A method returning a mutable reference
fn baz(&mut self, x: i32) -> &mut i32;
/// A method returning a `'static` reference
fn bean(&self) -> &'static i32;
/// A static method
fn bang(x: i32) -> i32;
}
#[cfg(doc)]
#[automock(mod mock_ffi;)]
extern "C" {
/// A foreign "C" function
pub fn ffi_func();
}