1 | #[macro_use ] |
2 | mod impl_for; |
3 | |
4 | #[macro_use ] |
5 | mod option_op; |
6 | |
7 | #[macro_use ] |
8 | mod option_op_assign; |
9 | |
10 | #[macro_use ] |
11 | mod option_op_checked; |
12 | |
13 | #[macro_use ] |
14 | mod option_op_overflowing; |
15 | |
16 | #[macro_use ] |
17 | mod option_op_saturating; |
18 | |
19 | #[macro_use ] |
20 | mod option_op_wrapping; |
21 | |
22 | macro_rules! common_option_op { |
23 | ($trait:ident, $op:ident, $op_name:ident $(, $extra_doc:expr)? $(,)?) => { |
24 | paste::paste! { |
25 | option_op!( |
26 | $trait, |
27 | $op, |
28 | $op_name, |
29 | $($extra_doc)? |
30 | ); |
31 | |
32 | option_op_assign!( |
33 | $trait, |
34 | $op, |
35 | $op_name, |
36 | $($extra_doc)? |
37 | ); |
38 | |
39 | option_op_overflowing!( |
40 | $trait, |
41 | $op, |
42 | $op_name, |
43 | $($extra_doc)? |
44 | ); |
45 | |
46 | option_op_wrapping!( |
47 | $trait, |
48 | $op, |
49 | $op_name, |
50 | $($extra_doc)? |
51 | ); |
52 | } |
53 | }; |
54 | } |
55 | |