pub struct PulseClientBuilder { /* private fields */ }Expand description
Fluent builder for PulseClient.
Implementations§
Source§impl PulseClientBuilder
impl PulseClientBuilder
Sourcepub fn base_url<S: Into<String>>(self, base_url: S) -> Self
pub fn base_url<S: Into<String>>(self, base_url: S) -> Self
Required — the Pulse server URL (e.g. http://localhost:9090).
Sourcepub fn token<S: Into<String>>(self, token: S) -> Self
pub fn token<S: Into<String>>(self, token: S) -> Self
Optional — pre-minted JWT to attach as Authorization: Bearer <token>.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Optional — per-request timeout. Default 30 seconds.
Sourcepub fn http_client(self, http: Client) -> Self
pub fn http_client(self, http: Client) -> Self
Optional — bring-your-own reqwest::Client (shared connection pools,
custom TLS / proxy / mTLS config, tracing middleware).
Sourcepub fn retry(self, policy: RetryPolicy) -> Self
pub fn retry(self, policy: RetryPolicy) -> Self
Optional — enable opt-in, bounded, full-jitter exponential-backoff
retries. Off by default. 429 (rate limited) is always retried for any
method (honouring Retry-After); on_status 5xx and transport errors are
retried only for idempotent methods unless retry_non_idempotent is set.
Terminal 4xx are never retried.
pub fn build(self) -> Result<PulseClient, PulseError>
Trait Implementations§
Source§impl Debug for PulseClientBuilder
impl Debug for PulseClientBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for PulseClientBuilder
impl !UnwindSafe for PulseClientBuilder
impl Freeze for PulseClientBuilder
impl Send for PulseClientBuilder
impl Sync for PulseClientBuilder
impl Unpin for PulseClientBuilder
impl UnsafeUnpin for PulseClientBuilder
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