pub struct FeatureFlag {
pub id: FeatureFlagId,
pub default_enabled: bool,
pub rules: Vec<FeatureFlagRule>,
}Fields§
§id: FeatureFlagId§default_enabled: bool§rules: Vec<FeatureFlagRule>Implementations§
Source§impl FeatureFlag
impl FeatureFlag
pub fn new( id: impl Into<String>, default_enabled: bool, ) -> Result<Self, ObservabilityError>
pub fn with_rule( self, target: FlagTarget, enabled: bool, ) -> Result<Self, ObservabilityError>
pub fn enabled_for(&self, context: &FeatureFlagContext) -> bool
Trait Implementations§
Source§impl Clone for FeatureFlag
impl Clone for FeatureFlag
Source§fn clone(&self) -> FeatureFlag
fn clone(&self) -> FeatureFlag
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FeatureFlag
impl Debug for FeatureFlag
Source§impl PartialEq for FeatureFlag
impl PartialEq for FeatureFlag
impl Eq for FeatureFlag
impl StructuralPartialEq for FeatureFlag
Auto Trait Implementations§
impl Freeze for FeatureFlag
impl RefUnwindSafe for FeatureFlag
impl Send for FeatureFlag
impl Sync for FeatureFlag
impl Unpin for FeatureFlag
impl UnsafeUnpin for FeatureFlag
impl UnwindSafe for FeatureFlag
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.