pub struct Features { /* private fields */ }Expand description
A flag nobody stored a rule for is off.
Implementations§
Source§impl Features
impl Features
pub fn enabled(&self, feature: Feature) -> bool
pub fn variant<V: Variants>(&self, variants: Variants<V>) -> Option<V>
pub fn enabled_named(&self, name: &str) -> bool
Sourcepub fn setting(&self, name: &str, default: SettingValue) -> SettingValue
pub fn setting(&self, name: &str, default: SettingValue) -> SettingValue
default unless a value of its kind is stored.
Sourcepub fn settings(&self) -> Vec<HeldSetting>
pub fn settings(&self) -> Vec<HeldSetting>
Sorted by name.
Sourcepub fn version(&self) -> u64
pub fn version(&self) -> u64
Changes whenever a rule or a setting does; equal on every instance holding the same ones.
pub fn evaluated(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Features
impl RefUnwindSafe for Features
impl Send for Features
impl Sync for Features
impl Unpin for Features
impl UnsafeUnpin for Features
impl UnwindSafe for Features
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more