switchboard_common/macros.rs
1/// Macro used to wrap client-only modules
2#[macro_export]
3macro_rules! cfg_client {
4 ($($item:item)*) => {
5 $(
6 #[cfg(feature = "client")]
7 $item
8 )*
9 }
10}
11
12/// Macro used to wrap exclusively non-client modules
13#[macro_export]
14macro_rules! cfg_not_client {
15 ($($item:item)*) => {
16 $(
17 #[cfg(not(feature = "client"))]
18 $item
19 )*
20 }
21}
22
23/// Macro used to wrap client-only modules
24#[macro_export]
25macro_rules! cfg_ipfs{
26 ($($item:item)*) => {
27 $(
28 #[cfg(feature = "ipfs")]
29 #[cfg_attr(doc_cfg, doc(cfg(feature = "ipfs")))]
30 $item
31 )*
32 }
33}