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.
- Application
Info - ApplicationInfo allows configuration of application metadata.
- Client
- A client for the LaunchDarkly API.
- Config
- Immutable configuration object for crate::Client.
- Config
Builder - 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.
- Context
Builder - 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.
- Event
Processor Builder - Contains methods for configuring delivery of analytics events.
- Flag
- Flag describes an individual feature flag.
- Flag
Detail - 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.
- Flag
Detail Config - 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.
- Migration
OpEvent - A MigrationOpEvent is generated through the migration op tracker provided through the SDK.
- Migration
OpTracker - 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.
- Migrator
Builder - 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.
- Multi
Context Builder - Contains methods for building a multi-context.
- Null
Event Processor Builder - An implementation of EventProcessorFactory that will discard all events received. This should only be used for unit tests.
- Persistent
Data Store Builder - Used to create a PersistentDataStoreWrapper instance, which wraps a PersistentDataStore.
- Persistent
Store Error - Error type used to represent failures when interacting with the underlying persistent stores.
- Polling
Data Source Builder - 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.
- Serialized
Item - A serialized item representing either a flag or a segment.
- Service
Endpoints Builder - Used for configuring the SDKs service URLs.
- Streaming
Data Source Builder - Contains methods for configuring the streaming data source.
Enums§
- Attribute
Value - An attribute value represents possible values that can be stored in a crate::Context.
- Build
Error - Error type used to represent failures when building a Client instance.
- Config
Build Error - Error type used to represent failures when building a Config instance.
- Data
Kind - Enum which denotes the kind of data that may be persisted in our data stores.
- Data
Source Build Error - Error type used to represent failures when building a DataSource instance.
- Eval
Error - 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.
- Event
Processor Build Error - Error type used to represent failures when building an EventProcessor instance.
- Execution
Order - ExecutionOrder represents the various execution modes this SDK can operate under while performing migration-assisted reads.
- Feature
Request Builder Error - Error type used to represent failures when building a FeatureRequesterFactory instance.
- Flag
Value - 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.
- Start
Error - Error type used to represent failures when starting the Client.
- Storage
Item - 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§
- Event
Processor - Trait for the component that buffers analytics events and sends them to LaunchDarkly. This component can be replaced for testing purposes.
- Feature
Requester Factory - Trait which allows creation of feature requesters.
- Persistent
Data Store - PersistentDataStore is an interface for a data store that holds feature flags and related data in a serialized form.
- Persistent
Data Store Factory - 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