2019-11-22 15:55:10 -08:00
|
|
|
macro_rules! cfg_codec {
|
|
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
|
|
|
|
#[cfg(feature = "codec")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "codec")))]
|
|
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-29 11:14:24 -08:00
|
|
|
macro_rules! cfg_compat {
|
|
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
|
|
|
|
#[cfg(feature = "compat")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "compat")))]
|
|
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-23 13:02:15 -07:00
|
|
|
/*
|
2019-11-22 15:55:10 -08:00
|
|
|
macro_rules! cfg_udp {
|
|
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
|
|
|
|
#[cfg(all(feature = "udp", feature = "codec"))]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(all(feature = "udp", feature = "codec"))))]
|
|
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-09-23 13:02:15 -07:00
|
|
|
*/
|
2020-09-08 09:12:32 +02:00
|
|
|
|
|
|
|
|
macro_rules! cfg_io {
|
|
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
|
|
|
|
#[cfg(feature = "io")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "io")))]
|
|
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-10-12 13:44:54 -04:00
|
|
|
|
2020-10-13 06:13:23 +09:00
|
|
|
macro_rules! cfg_rt {
|
2020-10-12 13:44:54 -04:00
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
2020-10-13 06:13:23 +09:00
|
|
|
#[cfg(feature = "rt")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
|
2020-10-12 13:44:54 -04:00
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|