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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
use ArgMatcher;
use ;
;
/// Returns a universal argument matcher.
///
/// The returned matcher will match any `T`
///
///
/// # Examples
///
/// ```
/// struct Data;
///
/// use faux::matcher::{self, ArgMatcher};
///
/// assert!(matcher::any().matches(&5));
/// assert!(matcher::any().matches("hello"));
/// assert!(matcher::any().matches(&Data));
/// ```
///
/// ## Usage within when!
///
/// For convenience, [`faux::when!`](crate::when!) uses `_` to denote
/// the `any` matcher. See the [matcher
/// syntax](../macro.when.html#argument-matchers) for more
/// information.
///
/// ```ignore
/// // `_` means the `any` matcher
/// faux::when!(my_struct.some_method(_)).then_return(5);
///
/// // we can also call it manually within `when!`
/// faux::when!(my_struct.some_method(_ = faux::matcher::any()))
/// .then_return(5);
///
/// // or call it manually outside `when!`
/// faux::when!(my_struct.some_method)
/// .with_args((matcher::any(),)).then_return(5);
/// ```
Sized>