Struct launchdarkly_server_sdk::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() -> Kind
 
pub fn user() -> Kind
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<Kind, <D as Deserializer<'de>>::Error>where
    D: Deserializer<'de>,
 
fn deserialize<D>( deserializer: D ) -> Result<Kind, <D as Deserializer<'de>>::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 PartialEq<&str> for Kind
 
impl PartialEq<&str> for Kind
source§impl PartialEq<Kind> for Kind
 
impl PartialEq<Kind> 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 moresource§impl Serialize for Kind
 
impl Serialize for Kind
source§fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
    S: Serializer,
 
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
source§impl TryFrom<String> for Kind
 
impl TryFrom<String> for Kind
source§fn try_from(value: String) -> Result<Kind, <Kind as TryFrom<String>>::Error>
 
fn try_from(value: String) -> Result<Kind, <Kind as TryFrom<String>>::Error>
Fallibly constructs a kind from an owned string.
To be a valid kind, the value cannot be empty or equal to “kind”.
Additionally, it must be composed entirely of ASCII alphanumeric characters, in
addition to -, . and _.
impl Eq for Kind
impl StructuralEq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
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
§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.