pub struct FeatureFlag {
pub key: String,
pub active: bool,
pub filters: FeatureFlagFilters,
pub has_experiment: Option<bool>,
}Expand description
A feature flag definition from PostHog.
Contains all the information needed to evaluate whether a flag should be enabled for a given user, including targeting rules and rollout percentages.
Fields§
§key: StringUnique identifier for the flag (e.g., “new-checkout-flow”)
active: boolWhether the flag is currently active. Inactive flags always return false.
filters: FeatureFlagFiltersTargeting rules and rollout configuration
has_experiment: Option<bool>Whether the flag is linked to an experiment, as reported by the
local-evaluation definitions endpoint. Tri-state: Some(true)/Some(false)
when the server reports it, None when it does not (older server). Drives
the $feature_flag_has_experiment property and event minimization.
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 (const: unstable) · 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<'de> Deserialize<'de> for FeatureFlag
impl<'de> Deserialize<'de> for FeatureFlag
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 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