macro_rules! cond { ( $(if $pred:ident ($($pred_args:tt)*) { $($yes:tt)* }) else + $(else { $($no:tt)* })? ) => { ... }; }
Expand description
A conditionally-compiled statement or item.
§Syntax
cond! {
if <if predicate> {
// arbitrary tokens
} else if <else-if predicate> { // There can be zero or more of these.
// arbitrary tokens
} else { // This is optional.
// arbitrary tokens
}
}
See the predicates section of the crate documentation for more information about the predicate grammar.