Struct launchdarkly_server_sdk::ConfigBuilder
source · [−]pub struct ConfigBuilder { /* private fields */ }
Expand description
Used to create a Config struct for creating crate::Client instances.
For usage examples see:
Implementations
sourceimpl ConfigBuilder
impl ConfigBuilder
sourcepub fn new(sdk_key: &str) -> Self
pub fn new(sdk_key: &str) -> Self
Create a new instance of the ConfigBuilder with the provided sdk_key
.
sourcepub fn service_endpoints(self, builder: &ServiceEndpointsBuilder) -> Self
pub fn service_endpoints(self, builder: &ServiceEndpointsBuilder) -> Self
Set the URLs to use for this client. For usage see ServiceEndpointsBuilder
sourcepub fn data_store(self, builder: &dyn DataStoreFactory) -> Self
pub fn data_store(self, builder: &dyn DataStoreFactory) -> Self
Set the data store to use for this client.
sourcepub fn data_source(self, builder: &dyn DataSourceFactory) -> Self
pub fn data_source(self, builder: &dyn DataSourceFactory) -> Self
Set the data source to use for this client. For usage see crate::data_source_builders::StreamingDataSourceBuilder
If offline mode is enabled, this data source will be ignored.
sourcepub fn event_processor(self, builder: &dyn EventProcessorFactory) -> Self
pub fn event_processor(self, builder: &dyn EventProcessorFactory) -> Self
Set the event processor to use for this client. For usage see crate::EventProcessorBuilder
If offline mode is enabled, this event processor will be ignored.
sourcepub fn offline(self, offline: bool) -> Self
pub fn offline(self, offline: bool) -> Self
Whether the client should be initialized in offline mode.
In offline mode, default values are returned for all flags and no remote network requests are made. By default, this is false.
sourcepub fn application_info(self, application_info: ApplicationInfo) -> Self
pub fn application_info(self, application_info: ApplicationInfo) -> Self
Provides configuration of application metadata.
These properties are optional and informational. They may be used in LaunchDarkly analytics or other product features, but they do not affect feature flag evaluations.
sourcepub fn build(self) -> Config
pub fn build(self) -> Config
Create a new instance of Config based on the ConfigBuilder configuration.
Auto Trait Implementations
impl !RefUnwindSafe for ConfigBuilder
impl !Send for ConfigBuilder
impl !Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl !UnwindSafe for ConfigBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more