pub struct ClientConfig {
pub pool_max_idle_per_host: usize,
pub pool_idle_timeout: Duration,
pub tcp_keepalive: Duration,
pub request_timeout: Duration,
pub connect_timeout: Duration,
pub user_agent: String,
}
Expand description
Configuration for HTTP client optimization
Fields§
§pool_max_idle_per_host: usize
Maximum number of idle connections per host
pool_idle_timeout: Duration
How long to keep idle connections alive
tcp_keepalive: Duration
TCP keepalive duration
request_timeout: Duration
Request timeout
connect_timeout: Duration
Connection timeout
user_agent: String
User agent string
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
Configuration optimized for high-throughput scenarios
Sourcepub fn low_memory() -> Self
pub fn low_memory() -> Self
Configuration optimized for low memory usage (< 100MB target)
Sourcepub fn ultra_low_memory() -> Self
pub fn ultra_low_memory() -> Self
Configuration optimized for ultra-low memory (< 50MB target)
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Configuration optimized for low-latency scenarios
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more