pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn send_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn send_endpoint(self, endpoint: impl Into<String>) -> Self
Overrides the exact /send endpoint.
If no batch endpoint is supplied, a sibling path ending in /batch is
derived from this URL.
Sourcepub fn batch_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn batch_endpoint(self, endpoint: impl Into<String>) -> Self
Overrides the exact /batch endpoint.
Sourcepub fn default_context(self, context: Context) -> Self
pub fn default_context(self, context: Context) -> Self
Sets context inherited by every new track and session.
Sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Sets the HTTP user-agent header.
Umami rejects ingestion requests without a proper user-agent. The
default is rust-umami/<crate-version>.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Sets a timeout applied to each ingestion request.
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Uses a caller-configured Reqwest client.
This is useful for custom proxies, TLS settings, connection pools, or middleware. The Umami-specific user-agent is still applied per request.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ClientBuilder
impl !UnwindSafe for ClientBuilder
impl Freeze for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
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