pub struct ClientOptions { /* private fields */ }Expand description
Configuration options for the PostHog client.
Use ClientOptionsBuilder to construct options with custom settings, or
create options directly from a project API key with
ClientOptions::from("your-api-key").
§Example
ⓘ
use posthog_rs::ClientOptionsBuilder;
let options = ClientOptionsBuilder::default()
.api_key("your-project-api-key".to_string())
.host("https://eu.posthog.com")
.build()
.unwrap();Implementations§
Source§impl ClientOptions
impl ClientOptions
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Check whether the client is disabled.
A client is disabled when configured with disabled(true) or when the
project API key is missing or blank after trimming.
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§fn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<&str> for ClientOptions
impl From<&str> for ClientOptions
Auto Trait Implementations§
impl !RefUnwindSafe for ClientOptions
impl !UnwindSafe for ClientOptions
impl Freeze for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnsafeUnpin for ClientOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more