pub struct HotClientBuilder { /* private fields */ }Expand description
Builder for HotClient.
Implementations§
Source§impl HotClientBuilder
impl HotClientBuilder
Sourcepub fn base_url(self, base_url: impl Into<String>) -> Self
pub fn base_url(self, base_url: impl Into<String>) -> Self
Overrides the base URL (default https://api.hot.dev). For local
development with hot dev, use http://localhost:4681.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Bounds each JSON request. Not applied to streaming or raw requests.
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Overrides the underlying reqwest::Client, e.g. to configure
proxies or connection pools. Do not set a client-wide timeout on a
client used for SSE subscriptions — it would sever long-lived streams.
pub fn build(self) -> HotClient
Auto Trait Implementations§
impl !RefUnwindSafe for HotClientBuilder
impl !UnwindSafe for HotClientBuilder
impl Freeze for HotClientBuilder
impl Send for HotClientBuilder
impl Sync for HotClientBuilder
impl Unpin for HotClientBuilder
impl UnsafeUnpin for HotClientBuilder
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