Struct launchdarkly_server_sdk_evaluation::Kind
source · pub struct Kind(_);
Expand description
Kind describes the type of entity represented by a Context. The meaning of a kind is entirely up to the application. To construct a custom kind other than “user”, see Kind::try_from.
Implementations§
source§impl Kind
impl Kind
sourcepub fn is_user(&self) -> bool
pub fn is_user(&self) -> bool
Returns true if the kind is “user”. Users are the default context kind created by crate::ContextBuilder.
sourcepub fn is_multi(&self) -> bool
pub fn is_multi(&self) -> bool
Returns true if the kind is “multi”. Multi-contexts are created by crate::MultiContextBuilder.
sourcepub fn user() -> Self
pub fn user() -> Self
Constructs a kind of type “user”. See also Kind::try_from to create a custom kind, which may then be passed to crate::ContextBuilder::kind.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Kind
impl<'de> Deserialize<'de> for Kind
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
source§impl Ord for Kind
impl Ord for Kind
source§impl PartialOrd<Kind> for Kind
impl PartialOrd<Kind> for Kind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more