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#[macro_export]
125macro_rules! cfg_feature_eframe {
126 ($($item:item)*) => {
127 $(
128 #[cfg(any(all(doc, docsrs), all(feature = "eframe", any(feature = "glow", feature = "wgpu"))))]
129 #[cfg_attr(docsrs, doc(cfg(all(feature = "eframe", any(feature = "glow", feature = "wgpu")))))]
130 $item
131 )*
132 }
133}
134
135#[macro_export]
138macro_rules! cfg_feature_plots {
139 ($($item:item)*) => {
140 $(
141 #[cfg(any(all(doc, docsrs), feature = "plots"))]
142 #[cfg_attr(docsrs, doc(cfg(feature = "plots")))]
143 $item
144 )*
145 }
146}
147
148#[macro_export]
151macro_rules! cfg_feature_git {
152 ($($item:item)*) => {
153 $(
154 #[cfg(any(all(doc, docsrs), feature = "git"))]
155 #[cfg_attr(docsrs, doc(cfg(feature = "git")))]
156 $item
157 )*
158 }
159}
160#[macro_export]
163macro_rules! cfg_not_wasm {
164 ($($item:item)*) => {
165 $(
166 #[cfg(any(all(doc, docsrs), not(target_arch = "wasm32")))]
167 #[cfg_attr(docsrs, doc(not(target_arch = "wasm32")))]
168 $item
169 )*
170 };
171}