Macro require_feature

Source
macro_rules! require_feature {
    ($feature: literal, $body: block) => { ... };
    ($feature: literal, $body: block, $error: expr) => { ... };
}
Expand description

Helper macro for bindings to return an error if the feature is not enabled. Produces an Err(String) variant if the feature is not enabled, and the value of the body if the feature is enabled.