Struct launchdarkly_server_sdk::Segment
source · pub struct Segment {
pub key: String,
pub included: Vec<String>,
pub excluded: Vec<String>,
pub unbounded: bool,
pub version: u64,
/* private fields */
}
Expand description
Segment describes a group of contexts based on keys and/or matching rules.
Fields§
§key: String
The unique key of the segment.
included: Vec<String>
A list of context keys that are always matched by this segment.
excluded: Vec<String>
A list of context keys that are never matched by this segment, unless the key is also in included.
unbounded: bool
Unbounded is true if this is a segment whose included list is stored separately and is not limited in size. Currently, the server-side Rust SDK cannot access the context list for this kind of segment; it only works when flags are being evaluated within the LaunchDarkly service.
The name is historical: “unbounded segments” was an earlier name for the product feature that is currently known as “big segments”. If unbounded is true, this is a big segment.
version: u64
An integer that is incremented by LaunchDarkly every time the configuration of the segment is changed.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Segment
impl<'de> Deserialize<'de> for Segment
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Segment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Segment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Serialize for Segment
impl Serialize for Segment
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,
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnwindSafe for Segment
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
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)
clone_to_uninit
)