Struct launchdarkly_server_sdk_evaluation::Kind
source · pub struct Kind(/* private fields */);
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 for Kind
impl PartialOrd for Kind
source§impl TryFrom<String> for Kind
impl TryFrom<String> for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.