pub struct PoolConfig {
pub max_concurrent_per_peer: usize,
pub max_concurrent_global: usize,
pub max_queue_per_peer: usize,
pub fair_scheduling: bool,
}Expand description
Configuration for the pooled transport.
Fields§
§max_concurrent_per_peer: usizeMaximum concurrent sends per peer.
max_concurrent_global: usizeGlobal maximum concurrent sends across all peers.
max_queue_per_peer: usizeMaximum pending sends in queue per peer before dropping.
fair_scheduling: boolWhether to enable fair scheduling across peers.
Implementations§
Source§impl PoolConfig
impl PoolConfig
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
Configuration for high-throughput scenarios.
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Configuration for low-latency scenarios.
Sourcepub fn large_cluster() -> Self
pub fn large_cluster() -> Self
Configuration for large clusters.
Sourcepub const fn with_max_concurrent_per_peer(self, max: usize) -> Self
pub const fn with_max_concurrent_per_peer(self, max: usize) -> Self
Set max concurrent per peer (builder pattern).
Sourcepub const fn with_max_concurrent_global(self, max: usize) -> Self
pub const fn with_max_concurrent_global(self, max: usize) -> Self
Set global max concurrent (builder pattern).
Sourcepub const fn with_max_queue_per_peer(self, max: usize) -> Self
pub const fn with_max_queue_per_peer(self, max: usize) -> Self
Set max queue per peer (builder pattern).
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
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 moreSource§impl Debug for PoolConfig
impl Debug for PoolConfig
Auto Trait Implementations§
impl Freeze for PoolConfig
impl RefUnwindSafe for PoolConfig
impl Send for PoolConfig
impl Sync for PoolConfig
impl Unpin for PoolConfig
impl UnwindSafe for PoolConfig
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