pub struct ClientGuard { /* private fields */ }Expand description
Guard that manages the PostHog client lifecycle.
When dropped, this guard triggers graceful shutdown of the background worker, attempting to flush pending events within the configured timeout.
§Examples
use better_posthog::{init, ClientOptions};
let _guard = init(ClientOptions::new("phc_your_api_key"));
// ... application code ...
// Guard is dropped here, triggering graceful shutdownTrait Implementations§
Auto Trait Implementations§
impl Freeze for ClientGuard
impl RefUnwindSafe for ClientGuard
impl Send for ClientGuard
impl Sync for ClientGuard
impl Unpin for ClientGuard
impl UnwindSafe for ClientGuard
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