pub struct StreamingDataSourceBuilder { /* private fields */ }
Expand description
Contains methods for configuring the streaming data source.
By default, the SDK uses a streaming connection to receive feature flag data from LaunchDarkly. If you want to customize the behavior of the connection, create a builder StreamingDataSourceBuilder::new, change its properties with the methods of this class, and pass it to crate::ConfigBuilder::data_source.
Examples
Adjust the initial reconnect delay.
ConfigBuilder::new("sdk-key").data_source(StreamingDataSourceBuilder::new()
.initial_reconnect_delay(Duration::from_secs(10)));
Implementations
sourceimpl StreamingDataSourceBuilder
impl StreamingDataSourceBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new instance of the StreamingDataSourceBuilder with default values.
sourcepub fn initial_reconnect_delay(&mut self, duration: Duration) -> &mut Self
pub fn initial_reconnect_delay(&mut self, duration: Duration) -> &mut Self
Sets the initial reconnect delay for the streaming connection.
sourcepub fn https_connector(&mut self, connector: HttpsConnector) -> &mut Self
pub fn https_connector(&mut self, connector: HttpsConnector) -> &mut Self
Sets the eventsource_client::HttpsConnector for the event
source client to use. This allows for re-use of a connector between
multiple client instances. This is especially useful for the sdk-test-harness
where many client instances are created throughout the test and reading
the native certificates is a substantial portion of the runtime.
Trait Implementations
sourceimpl Clone for StreamingDataSourceBuilder
impl Clone for StreamingDataSourceBuilder
sourcefn clone(&self) -> StreamingDataSourceBuilder
fn clone(&self) -> StreamingDataSourceBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for StreamingDataSourceBuilder
impl Send for StreamingDataSourceBuilder
impl Sync for StreamingDataSourceBuilder
impl Unpin for StreamingDataSourceBuilder
impl !UnwindSafe for StreamingDataSourceBuilder
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
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