Crate launchdarkly_server_sdk

Source
Expand description

launchdarkly-server-sdk is the main crate for the LaunchDarkly SDK.

This package contains the types and methods for the SDK client Client and its overall configuration.

For more information and code examples, see the Rust SDK Reference: https://docs.launchdarkly.com/sdk/server-side/rust

Structs§

AllData
Used to hold store information and initial payloads from LaunchDarkly.
ApplicationInfo
ApplicationInfo allows configuration of application metadata.
Client
A client for the LaunchDarkly API.
Config
Immutable configuration object for crate::Client.
ConfigBuilder
Used to create a Config struct for creating crate::Client instances.
Context
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.
ContextBuilder
Contains methods for building a Context with a specified key.
Detail
A Detail instance is returned from evaluate, combining the result of a flag evaluation with an explanation of how it was calculated.
EventProcessorBuilder
Contains methods for configuring delivery of analytics events.
Flag
Flag describes an individual feature flag.
FlagDetail
FlagDetail is a snapshot of the state of multiple feature flags with regard to a specific user. This is the return type of crate::Client::all_flags_detail.
FlagDetailConfig
Configuration struct to control the type of data returned from the crate::Client::all_flags_detail method. By default, each of the options default to false. However, you can selectively enable them by calling the appropriate functions.
Kind
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.
MigrationOpEvent
A MigrationOpEvent is generated through the migration op tracker provided through the SDK.
MigrationOpTracker
A MigrationOpTracker is responsible for managing the collection of measurements that a user might wish to record throughout a migration-assisted operation.
Migrator
The migrator is the primary interface for executing migration operations. It is configured through the MigratorBuilder and can be used to perform LaunchDarkly assisted technology migrations through the use of migration-based feature flags.
MigratorBuilder
The migration builder is used to configure and construct an instance of a Migrator. This migrator can be used to perform LaunchDarkly assisted technology migrations through the use of migration-based feature flags.
MultiContextBuilder
Contains methods for building a multi-context.
NullEventProcessorBuilder
An implementation of EventProcessorFactory that will discard all events received. This should only be used for unit tests.
PersistentDataStoreBuilder
Used to create a PersistentDataStoreWrapper instance, which wraps a PersistentDataStore.
PersistentStoreError
Error type used to represent failures when interacting with the underlying persistent stores.
PollingDataSourceBuilder
Contains methods for configuring the polling data source.
Reference
Represents an attribute name or path expression identifying a value within a crate::Context.
Segment
Segment describes a group of contexts based on keys and/or matching rules.
SerializedItem
A serialized item representing either a flag or a segment.
ServiceEndpointsBuilder
Used for configuring the SDKs service URLs.
StreamingDataSourceBuilder
Contains methods for configuring the streaming data source.

Enums§

AttributeValue
An attribute value represents possible values that can be stored in a crate::Context.
BuildError
Error type used to represent failures when building a Client instance.
ConfigBuildError
Error type used to represent failures when building a Config instance.
DataKind
Enum which denotes the kind of data that may be persisted in our data stores.
DataSourceBuildError
Error type used to represent failures when building a DataSource instance.
EvalError
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.
EventProcessorBuildError
Error type used to represent failures when building an EventProcessor instance.
ExecutionOrder
ExecutionOrder represents the various execution modes this SDK can operate under while performing migration-assisted reads.
FeatureRequestBuilderError
Error type used to represent failures when building a FeatureRequesterFactory instance.
FlagValue
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.
Operation
Operation represents a type of migration operation; namely, read or write.
Origin
Origin represents the source of origin for a migration-related operation.
Reason
Reason describes the reason that a flag evaluation produced a particular value.
Stage
Stage denotes one of six possible stages a technology migration could be a part of, progressing through the following order.
StartError
Error type used to represent failures when starting the Client.
StorageItem
Enum to denote whether the item is a valid type T or if it is a tombstone place holder used to show the item T was deleted.

Traits§

EventProcessor
Trait for the component that buffers analytics events and sends them to LaunchDarkly. This component can be replaced for testing purposes.
FeatureRequesterFactory
Trait which allows creation of feature requesters.
PersistentDataStore
PersistentDataStore is an interface for a data store that holds feature flags and related data in a serialized form.
PersistentDataStoreFactory
PersistentDataStoreFactory is an interface for a factory that creates some implementation of a PersistentDataStore.
Versioned
Trait indicating that the item is versioned.

Functions§

version_string
Return the SDK version