3 [Documentation](https://docs.rs/cfg-if)
5 A macro to ergonomically define an item depending on a large number of #[cfg]
6 parameters. Structured like an if-else chain, the first matching branch is the
7 item that gets emitted.
19 fn foo() { /* unix specific functionality */ }
20 } else if #[cfg(target_pointer_width = "32")] {
21 fn foo() { /* non-unix, 32-bit functionality */ }
23 fn foo() { /* fallback implementation */ }
34 This project is licensed under either of
36 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
37 http://www.apache.org/licenses/LICENSE-2.0)
38 * MIT license ([LICENSE-MIT](LICENSE-MIT) or
39 http://opensource.org/licenses/MIT)
45 Unless you explicitly state otherwise, any contribution intentionally submitted
46 for inclusion in `cfg-if` by you, as defined in the Apache-2.0 license, shall be
47 dual licensed as above, without any additional terms or conditions.