pub struct ProxyPoolConfigBuilder { /* private fields */ }Expand description
Builder for ProxyPoolConfig.
Implementations§
Source§impl ProxyPoolConfigBuilder
impl ProxyPoolConfigBuilder
Sourcepub fn hosts(self, hosts: Vec<HostConfig>) -> Self
pub fn hosts(self, hosts: Vec<HostConfig>) -> Self
Set all host configs.
Exactly one host should set primary(true) as fallback for unknown hosts.
Sourcepub fn add_host(self, host: HostConfig) -> Self
pub fn add_host(self, host: HostConfig) -> Self
Add one host config.
Exactly one host should set primary(true) as fallback for unknown hosts.
Sourcepub fn client_builder_factory<F>(self, factory: F) -> Self
pub fn client_builder_factory<F>(self, factory: F) -> Self
Set request client builder factory.
Middleware will call this factory on each attempt, then append proxy settings. Use this to keep timeout/pool/TLS settings aligned with your outer client setup.
Sourcepub fn build(self) -> ProxyPoolConfig
pub fn build(self) -> ProxyPoolConfig
Build config.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyPoolConfigBuilder
impl !RefUnwindSafe for ProxyPoolConfigBuilder
impl Send for ProxyPoolConfigBuilder
impl Sync for ProxyPoolConfigBuilder
impl Unpin for ProxyPoolConfigBuilder
impl UnsafeUnpin for ProxyPoolConfigBuilder
impl !UnwindSafe for ProxyPoolConfigBuilder
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