1macro_rules! cfg_codec {
2 ($($item:item)*) => {
3 $(
4 #[cfg(feature = "codec")]
5 #[cfg_attr(docsrs, doc(cfg(feature = "codec")))]
6 $item
7 )*
8 }
9}
10
11macro_rules! cfg_compat {
12 ($($item:item)*) => {
13 $(
14 #[cfg(feature = "compat")]
15 #[cfg_attr(docsrs, doc(cfg(feature = "compat")))]
16 $item
17 )*
18 }
19}
20
21macro_rules! cfg_net {
22 ($($item:item)*) => {
23 $(
24 #[cfg(all(feature = "net", feature = "codec"))]
25 #[cfg_attr(docsrs, doc(cfg(all(feature = "net", feature = "codec"))))]
26 $item
27 )*
28 }
29}
30
31macro_rules! cfg_io {
32 ($($item:item)*) => {
33 $(
34 #[cfg(feature = "io")]
35 #[cfg_attr(docsrs, doc(cfg(feature = "io")))]
36 $item
37 )*
38 }
39}
40
41cfg_io! {
42 macro_rules! cfg_io_util {
43 ($($item:item)*) => {
44 $(
45 #[cfg(feature = "io-util")]
46 #[cfg_attr(docsrs, doc(cfg(feature = "io-util")))]
47 $item
48 )*
49 }
50 }
51}
52
53macro_rules! cfg_rt {
54 ($($item:item)*) => {
55 $(
56 #[cfg(feature = "rt")]
57 #[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
58 $item
59 )*
60 }
61}
62
63macro_rules! cfg_time {
64 ($($item:item)*) => {
65 $(
66 #[cfg(feature = "time")]
67 #[cfg_attr(docsrs, doc(cfg(feature = "time")))]
68 $item
69 )*
70 }
71}
72