pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client. Construct with Client::builder.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn base_url(self, base_url: impl Into<String>) -> Self
pub fn base_url(self, base_url: impl Into<String>) -> Self
Override the API base URL (default https://opensms.io). Trailing
slashes are stripped.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Per-attempt timeout covering connect and read. Default 30 s.
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Retries after the first attempt. Default 2 (3 attempts). 0 disables
retries.
Sourcepub fn transport(self, transport: Arc<dyn Transport>) -> Self
pub fn transport(self, transport: Arc<dyn Transport>) -> Self
Replace the HTTP transport (for tests or custom networking).
Auto Trait Implementations§
impl !RefUnwindSafe for ClientBuilder
impl !UnwindSafe for ClientBuilder
impl Forget for ClientBuilder
impl Freeze for ClientBuilder
impl Move 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