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-11-06 10:59:15 -05:00
|
|
|
macro_rules! cfg_net {
|
2019-11-22 15:55:10 -08:00
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
2020-11-06 10:59:15 -05:00
|
|
|
#[cfg(all(feature = "net", feature = "codec"))]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(all(feature = "net", feature = "codec"))))]
|
2019-11-22 15:55:10 -08:00
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|
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
|
|
|
|
2021-10-22 12:46:29 -04:00
|
|
|
cfg_io! {
|
|
|
|
|
macro_rules! cfg_io_util {
|
|
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
|
|
|
|
#[cfg(feature = "io-util")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "io-util")))]
|
|
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-03-11 17:02:01 +02:00
|
|
|
|
|
|
|
|
macro_rules! cfg_time {
|
|
|
|
|
($($item:item)*) => {
|
|
|
|
|
$(
|
|
|
|
|
#[cfg(feature = "time")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "time")))]
|
|
|
|
|
$item
|
|
|
|
|
)*
|
|
|
|
|
}
|
|
|
|
|
}
|