launchdarkly_server_sdk_evaluation/contexts/
context_serde_helpers.rsuse crate::contexts::context_serde::Meta;
use serde::Deserialize;
pub(super) fn is_false_bool_option(b: &Option<bool>) -> bool {
match b {
None => true,
Some(b) => !b,
}
}
pub(super) fn is_empty_vec_option<'re, T>(v: &Option<Vec<T>>) -> bool
where
T: Deserialize<'re>,
{
match v {
None => true,
Some(v) => v.is_empty(),
}
}
pub(super) fn is_none_meta_option(m: &Option<Meta>) -> bool {
match m {
None => true,
Some(m) => m.secondary.is_none() && is_empty_vec_option(&m.private_attributes),
}
}