pub struct FeatureContext {
pub key: String,
pub name: String,
pub enabled: bool,
pub value: FlagsmithValue,
pub priority: Option<f64>,
pub variants: Vec<FeatureValue>,
pub metadata: FeatureMetadata,
}Expand description
Represents a feature context for feature flag evaluation.
Fields§
§key: StringString key used for hashing in percentage splits.
name: StringThe name of the feature.
enabled: boolWhether the feature is enabled.
value: FlagsmithValueThe default value for the feature.
priority: Option<f64>Priority for this feature context. Lower values indicate higher priority.
variants: Vec<FeatureValue>Multivariate feature variants.
metadata: FeatureMetadataMetadata about the feature.
Trait Implementations§
Source§impl Clone for FeatureContext
impl Clone for FeatureContext
Source§fn clone(&self) -> FeatureContext
fn clone(&self) -> FeatureContext
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 FeatureContext
impl Debug for FeatureContext
Source§impl<'de> Deserialize<'de> for FeatureContext
impl<'de> Deserialize<'de> for FeatureContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FeatureContext
impl RefUnwindSafe for FeatureContext
impl Send for FeatureContext
impl Sync for FeatureContext
impl Unpin for FeatureContext
impl UnwindSafe for FeatureContext
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