pub struct ClientConfigBuilder { /* private fields */ }Implementations§
Source§impl ClientConfigBuilder
impl ClientConfigBuilder
pub fn host(self, host: impl Into<String>) -> Self
pub fn port(self, port: u16) -> Self
pub fn base_path(self, path: impl Into<String>) -> Self
pub fn tls(self, tls: bool) -> Self
pub fn accept_invalid_certs(self, accept: bool) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
Sourcepub fn proxy(self, url: impl Into<String>) -> Self
pub fn proxy(self, url: impl Into<String>) -> Self
Route every request through an outbound proxy.
Accepts http://, https://, socks5:// or socks5h:// URLs.
Authentication may be embedded (http://u:p@host:1080) or set
separately via Self::proxy_auth.
Sourcepub fn proxy_auth(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn proxy_auth( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Supply basic-auth credentials for the proxy.
Has no effect unless Self::proxy is also set.
pub fn build(self) -> Result<ClientConfig>
Trait Implementations§
Source§impl Debug for ClientConfigBuilder
impl Debug for ClientConfigBuilder
Source§impl Default for ClientConfigBuilder
impl Default for ClientConfigBuilder
Source§fn default() -> ClientConfigBuilder
fn default() -> ClientConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientConfigBuilder
impl RefUnwindSafe for ClientConfigBuilder
impl Send for ClientConfigBuilder
impl Sync for ClientConfigBuilder
impl Unpin for ClientConfigBuilder
impl UnsafeUnpin for ClientConfigBuilder
impl UnwindSafe for ClientConfigBuilder
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