1#[macro_export]
11macro_rules! cfg_windows {
12 ($($item:item)*) => {
13 $(
14 #[cfg(any(all(doc, docsrs), windows))]
15 #[cfg_attr(docsrs, doc(cfg(windows)))]
16 $item
17 )*
18 }
19}
20
21#[macro_export]
24macro_rules! cfg_unix {
25 ($($item:item)*) => {
26 $(
27 #[cfg(any(all(doc, docsrs), unix))]
28 #[cfg_attr(docsrs, doc(cfg(unix)))]
29 $item
30 )*
31 }
32}
33
34#[macro_export]
37macro_rules! cfg_docs {
38 ($($item:item)*) => {
39 $(
40 #[cfg(all(doc, docsrs))]
41 $item
42 )*
43 };
44}
45
46#[macro_export]
49macro_rules! cfg_feature_std {
50 ($($item:item)*) => {
51 $(
52 #[cfg(any(all(doc, docsrs), feature = "std"))]
53 #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
54 $item
55 )*
56 }
57}
58
59#[macro_export]
62macro_rules! cfg_feature_nostd {
63 ($($item:item)*) => {
64 $(
65 #[cfg(any(all(doc, docsrs), not(feature = "std")))]
66 $item
67 )*
68 }
69}
70
71#[macro_export]
74macro_rules! cfg_feature_alloc {
75 ($($item:item)*) => {
76 $(
77 #[cfg(any(all(doc, docsrs), feature = "alloc"))]
78 #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))]
79 $item
80 )*
81 }
82}
83
84#[macro_export]
87macro_rules! cfg_feature_serde {
88 ($($item:item)*) => {
89 $(
90 #[cfg(any(all(doc, docsrs), feature = "serde"))]
91 #[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
92 $item
93 )*
94 }
95}
96
97#[macro_export]
100macro_rules! cfg_feature_bits {
101 ($($item:item)*) => {
102 $(
103 #[cfg(any(all(doc, docsrs), feature = "bits"))]
104 #[cfg_attr(docsrs, doc(cfg(feature = "bits")))]
105 $item
106 )*
107 }
108}
109
110#[macro_export]
113macro_rules! cfg_feature_egui {
114 ($($item:item)*) => {
115 $(
116 #[cfg(any(all(doc, docsrs), feature = "egui"))]
117 #[cfg_attr(docsrs, doc(cfg(feature = "egui")))]
118 $item
119 )*
120 }
121}
122
123#[macro_export]
126macro_rules! cfg_feature_plots {
127 ($($item:item)*) => {
128 $(
129 #[cfg(any(all(doc, docsrs), feature = "plots"))]
130 #[cfg_attr(docsrs, doc(cfg(feature = "plots")))]
131 $item
132 )*
133 }
134}
135
136#[macro_export]
139macro_rules! cfg_feature_git {
140 ($($item:item)*) => {
141 $(
142 #[cfg(any(all(doc, docsrs), feature = "git"))]
143 #[cfg_attr(docsrs, doc(cfg(feature = "git")))]
144 $item
145 )*
146 }
147}