pub struct H2ConnectionConfig {
pub initial_connection_window: u32,
pub max_concurrent_streams: u32,
pub stream_shrink_ratio: u32,
}Expand description
Configurable H2 connection tuning parameters.
All values have safe defaults. When configured via listener config, absent values fall back to compile-time defaults.
Fields§
§initial_connection_window: u32Connection-level receive window size in bytes (RFC 9113 §6.9.2).
max_concurrent_streams: u32Maximum concurrent streams (SETTINGS_MAX_CONCURRENT_STREAMS).
stream_shrink_ratio: u32Shrink threshold ratio for recycled stream slots.
Implementations§
Source§impl H2ConnectionConfig
impl H2ConnectionConfig
Sourcepub fn new(
initial_connection_window: u32,
max_concurrent_streams: u32,
stream_shrink_ratio: u32,
) -> Self
pub fn new( initial_connection_window: u32, max_concurrent_streams: u32, stream_shrink_ratio: u32, ) -> Self
Create a validated config, clamping to safe bounds.
initial_connection_window: clamped to [65535, 2^31-1] per RFC 9113 §6.9max_concurrent_streams: minimum 1stream_shrink_ratio: minimum 2 (1 would defeat slot recycling)
Trait Implementations§
Source§impl Clone for H2ConnectionConfig
impl Clone for H2ConnectionConfig
Source§fn clone(&self) -> H2ConnectionConfig
fn clone(&self) -> H2ConnectionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for H2ConnectionConfig
Source§impl Debug for H2ConnectionConfig
impl Debug for H2ConnectionConfig
Source§impl Default for H2ConnectionConfig
impl Default for H2ConnectionConfig
impl Eq for H2ConnectionConfig
Source§impl PartialEq for H2ConnectionConfig
impl PartialEq for H2ConnectionConfig
Source§fn eq(&self, other: &H2ConnectionConfig) -> bool
fn eq(&self, other: &H2ConnectionConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for H2ConnectionConfig
Auto Trait Implementations§
impl Freeze for H2ConnectionConfig
impl RefUnwindSafe for H2ConnectionConfig
impl Send for H2ConnectionConfig
impl Sync for H2ConnectionConfig
impl Unpin for H2ConnectionConfig
impl UnsafeUnpin for H2ConnectionConfig
impl UnwindSafe for H2ConnectionConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.