Crate launchdarkly_server_sdk_evaluation

Source
Expand description

This crate contains the LaunchDarkly Rust SDK feature flag evaluation engine.

Normal use of the Rust SDK does not require referencing this crate directly. It is used internally by the SDK, but is published and versioned separately so it can be used in other LaunchDarkly components without making the SDK versioning dependent on these internal APIs.

Structs§

  • Clause describes an individual clause within a crate::FlagRule or SegmentRule.
  • ClientSideAvailability describes whether a flag is available to client-side SDKs.
  • Context is a collection of attributes that can be referenced in flag evaluations and analytics events. These attributes are described by one or more Kinds.
  • ContextAttributes is used to handle redaction of select context properties when serializing a Context that will be sent to LaunchDarkly.
  • Contains methods for building a Context with a specified key.
  • A Detail instance is returned from evaluate, combining the result of a flag evaluation with an explanation of how it was calculated.
  • Flag describes an individual feature flag.
  • FlagRule describes a single rule within a feature flag.
  • 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.
  • Contains methods for building a multi-context.
  • Prereq describes a requirement that another feature flag return a specific variation.
  • A struct representing the results of an evaluation on a prerequisite flag.
  • Represents an attribute name or path expression identifying a value within a crate::Context.
  • Rollout describes how contexts will be bucketed into variations during a percentage rollout.
  • Segment describes a group of contexts based on keys and/or matching rules.
  • WeightedVariation describes a fraction of contexts which will receive a specific variation.

Enums§

  • An attribute value represents possible values that can be stored in a crate::Context.
  • Error is returned via a Reason::Error when the client could not evaluate a flag, and provides information about why the flag could not be evaluated.
  • FlagValue represents any of the data types supported by JSON, all of which can be used for a LaunchDarkly feature flag variation or a custom context attribute.
  • Reason describes the reason that a flag evaluation produced a particular value.
  • RolloutKind describes whether a rollout is a simple percentage rollout or represents an experiment. Experiments have different behaviour for tracking and variation bucketing.
  • VariationOrRollout describes either a fixed variation or a percentage rollout.

Traits§

  • Trait used by evaluate to record the result of prerequisite flag evaluations.
  • Store is an interface for a data store that holds feature flags and related data received by the SDK.
  • Trait indicating that the item is versioned.

Functions§

Type Aliases§