pub struct ClientOptionsBuilder { /* private fields */ }Expand description
Builder for ClientOptions.
Implementations§
Source§impl ClientOptionsBuilder
impl ClientOptionsBuilder
Sourcepub fn host<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn host<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Host URL for the PostHog API (defaults to US ingestion endpoint)
Sourcepub fn api_key(&mut self, value: String) -> &mut Self
pub fn api_key(&mut self, value: String) -> &mut Self
Project API key. If missing or blank, the client is disabled.
Sourcepub fn request_timeout_seconds(&mut self, value: u64) -> &mut Self
pub fn request_timeout_seconds(&mut self, value: u64) -> &mut Self
Request timeout in seconds
Sourcepub fn personal_api_key<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn personal_api_key<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Personal API key for fetching flag definitions (required for local evaluation)
Sourcepub fn enable_local_evaluation(&mut self, value: bool) -> &mut Self
pub fn enable_local_evaluation(&mut self, value: bool) -> &mut Self
Enable local evaluation of feature flags
Sourcepub fn poll_interval_seconds(&mut self, value: u64) -> &mut Self
pub fn poll_interval_seconds(&mut self, value: u64) -> &mut Self
Interval for polling flag definitions (in seconds)
Sourcepub fn disable_geoip(&mut self, value: bool) -> &mut Self
pub fn disable_geoip(&mut self, value: bool) -> &mut Self
Disable automatic geoip enrichment
Sourcepub fn feature_flags_request_timeout_seconds(&mut self, value: u64) -> &mut Self
pub fn feature_flags_request_timeout_seconds(&mut self, value: u64) -> &mut Self
Feature flags request timeout in seconds
Sourcepub fn local_evaluation_only(&mut self, value: bool) -> &mut Self
pub fn local_evaluation_only(&mut self, value: bool) -> &mut Self
When true, never fall back to the remote API for flag evaluation. If local
evaluation is inconclusive (flag not cached or missing properties), the SDK
returns Ok(None) instead of making a network call. Only meaningful when
enable_local_evaluation is also true.
Source§impl ClientOptionsBuilder
impl ClientOptionsBuilder
Sourcepub fn build(&self) -> Result<ClientOptions, ClientOptionsBuilderError>
pub fn build(&self) -> Result<ClientOptions, ClientOptionsBuilderError>
Build sanitized ClientOptions.
Missing or whitespace-only API keys are allowed and disable the client so SDK initialization remains infallible while avoiding requests with an empty API key.
Trait Implementations§
Source§impl Clone for ClientOptionsBuilder
impl Clone for ClientOptionsBuilder
Source§fn clone(&self) -> ClientOptionsBuilder
fn clone(&self) -> ClientOptionsBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more