Document Features::enabled
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
parent
029725f139
commit
0f0bfc9c22
1 changed files with 3 additions and 0 deletions
|
@ -53,6 +53,9 @@ macro_rules! declare_features {
|
|||
$(f(stringify!($feature), self.$feature);)+
|
||||
}
|
||||
|
||||
/// Is the given feature enabled?
|
||||
///
|
||||
/// Panics if the symbol doesn't correspond to a declared feature.
|
||||
pub fn enabled(&self, feature: Symbol) -> bool {
|
||||
match feature {
|
||||
$( sym::$feature => self.$feature, )*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue