pub struct QuicConfig {
pub max_idle_timeout_ms: u64,
pub keep_alive_interval_ms: u64,
pub max_concurrent_bidi_streams: u64,
pub max_concurrent_uni_streams: u64,
pub initial_max_data: u64,
pub max_stream_data: u64,
pub max_udp_payload_size: u16,
pub congestion_control: CongestionControl,
pub enable_0rtt: bool,
pub enable_datagrams: bool,
pub datagram_recv_buffer_size: usize,
pub datagram_send_buffer_size: usize,
}Expand description
QUIC configuration
Fields§
§max_idle_timeout_ms: u64Maximum idle timeout in milliseconds (0 = no timeout)
keep_alive_interval_ms: u64Keep-alive interval in milliseconds (0 = disabled)
max_concurrent_bidi_streams: u64Maximum concurrent bidirectional streams
max_concurrent_uni_streams: u64Maximum concurrent unidirectional streams
initial_max_data: u64Initial maximum data (connection-level flow control)
max_stream_data: u64Maximum data per stream
max_udp_payload_size: u16Maximum UDP payload size
congestion_control: CongestionControlCongestion control algorithm
enable_0rtt: boolEnable 0-RTT (faster reconnections)
enable_datagrams: boolEnable datagram support
datagram_recv_buffer_size: usizeDatagram receive buffer size
datagram_send_buffer_size: usizeDatagram send buffer size
Implementations§
Source§impl QuicConfig
impl QuicConfig
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Create configuration optimized for low latency
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
Create configuration optimized for high throughput
Sourcepub fn with_max_idle_timeout(self, timeout_ms: u64) -> Self
pub fn with_max_idle_timeout(self, timeout_ms: u64) -> Self
Builder pattern: set max idle timeout
Sourcepub fn with_keep_alive(self, interval_ms: u64) -> Self
pub fn with_keep_alive(self, interval_ms: u64) -> Self
Builder pattern: set keep-alive interval
Sourcepub fn with_congestion_control(self, cc: CongestionControl) -> Self
pub fn with_congestion_control(self, cc: CongestionControl) -> Self
Builder pattern: set congestion control
Sourcepub fn with_datagrams(self, enable: bool) -> Self
pub fn with_datagrams(self, enable: bool) -> Self
Builder pattern: enable/disable datagrams
Trait Implementations§
Source§impl Clone for QuicConfig
impl Clone for QuicConfig
Source§fn clone(&self) -> QuicConfig
fn clone(&self) -> QuicConfig
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 QuicConfig
impl Debug for QuicConfig
Source§impl Default for QuicConfig
impl Default for QuicConfig
Source§impl<'de> Deserialize<'de> for QuicConfig
impl<'de> Deserialize<'de> for QuicConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuicConfig
impl RefUnwindSafe for QuicConfig
impl Send for QuicConfig
impl Sync for QuicConfig
impl Unpin for QuicConfig
impl UnwindSafe for QuicConfig
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<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