pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client. All knobs have sensible defaults; the only thing
you must provide is an API key (or set ANAKIN_API_KEY).
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
pub fn api_key(self, key: impl Into<String>) -> Self
pub fn base_url(self, url: impl Into<String>) -> Self
pub fn timeout(self, t: Duration) -> Self
pub fn max_retries(self, n: u32) -> Self
pub fn poll_interval(self, d: Duration) -> Self
pub fn poll_max_interval(self, d: Duration) -> Self
pub fn poll_timeout(self, d: Duration) -> Self
Sourcepub fn http_client(self, c: Client) -> Self
pub fn http_client(self, c: Client) -> Self
Inject a pre-built reqwest::Client (e.g. with custom proxies).
pub fn build(self) -> Result<Client>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl !UnwindSafe 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