Expand description
FlagValue represents any of the data types supported by JSON, all of which can be used for a LaunchDarkly feature flag variation or a custom user attribute.
Variants
Bool(bool)
Used when the value is a boolean.
Str(String)
Used when the value is a string.
Number(f64)
Used when the value is a number.
Json(Value)
Used when the value is an arbitrary JSON value.
Implementations
Attempts to convert the FlagValue into a boolean representation, returning None if the conversion is invalid.
Attempts to convert the FlagValue into a string representation, returning None if the conversion is invalid.
Attempts to convert the FlagValue into a float representation, returning None if the conversion is invalid.
Attempts to convert the FlagValue into a integer representation, returning None if the conversion is invalid.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<FlagValue, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<FlagValue, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for FlagValue
impl UnwindSafe for FlagValue
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more