core_crypto_ffi/proteus.rs
1/// Implement a proteus function, or return an error if the feature is not enabled.
2///
3/// The `macro_export` macro ensures this shows up at the crate root in all cases.
4#[macro_export]
5macro_rules! proteus_impl {
6 ($body:block) => {{
7 if cfg!(feature = "proteus") {
8 $body
9 } else {
10 Err(core_crypto::Error::FeatureDisabled("proteus").into())
11 }
12 }};
13}