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
macro_rules! cfg_codec {
    ($($item:item)*) => {
        $(
            #[cfg(feature = "codec")]
            #[cfg_attr(docsrs, doc(cfg(feature = "codec")))]
            $item
        )*
    }
}

macro_rules! cfg_compat {
    ($($item:item)*) => {
        $(
            #[cfg(feature = "compat")]
            #[cfg_attr(docsrs, doc(cfg(feature = "compat")))]
            $item
        )*
    }
}

/*
macro_rules! cfg_udp {
    ($($item:item)*) => {
        $(
            #[cfg(all(feature = "udp", feature = "codec"))]
            #[cfg_attr(docsrs, doc(cfg(all(feature = "udp", feature = "codec"))))]
            $item
        )*
    }
}
*/

macro_rules! cfg_io {
    ($($item:item)*) => {
        $(
            #[cfg(feature = "io")]
            #[cfg_attr(docsrs, doc(cfg(feature = "io")))]
            $item
        )*
    }
}

macro_rules! cfg_rt {
    ($($item:item)*) => {
        $(
            #[cfg(feature = "rt")]
            #[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
            $item
        )*
    }
}