pub struct Features { /* private fields */ }Expand description
A flag nobody stored a rule for is off.
Implementations§
Source§impl Features
impl Features
Sourcepub fn overridden(self, overrides: Arc<[(String, String)]>) -> Self
pub fn overridden(self, overrides: Arc<[(String, String)]>) -> Self
Each answer is on, off or a variant’s name, and wins over the stored rule.
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 enabled_for_someone(&self, feature: Feature) -> bool
pub fn enabled_for_someone(&self, feature: Feature) -> bool
Whether any principal of the subject’s area could have it on: what a request that carries no credentials, such as a CORS preflight, can be told. Not recorded.
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 Forget for Features
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