Struct QuicSettings

Source
#[non_exhaustive]
pub struct QuicSettings {
Show 39 fields pub alpn: Vec<Vec<u8>>, pub enable_dgram: bool, pub dgram_recv_max_queue_len: usize, pub dgram_send_max_queue_len: usize, pub initial_max_data: u64, pub initial_max_stream_data_bidi_local: u64, pub initial_max_stream_data_bidi_remote: u64, pub initial_max_stream_data_uni: u64, pub initial_max_streams_bidi: u64, pub initial_max_streams_uni: u64, pub max_idle_timeout: Option<Duration>, pub disable_active_migration: bool, pub active_connection_id_limit: u64, pub max_recv_udp_payload_size: usize, pub max_send_udp_payload_size: usize, pub disable_client_ip_validation: bool, pub keylog_file: Option<String>, pub qlog_dir: Option<String>, pub cc_algorithm: String, pub initial_congestion_window_packets: usize, pub discover_path_mtu: bool, pub enable_hystart: bool, pub enable_pacing: bool, pub max_pacing_rate: Option<u64>, pub enable_expensive_packet_count_metrics: bool, pub capture_quiche_logs: bool, pub handshake_timeout: Option<Duration>, pub listen_backlog: usize, pub verify_peer: bool, pub max_connection_window: u64, pub max_stream_window: u64, pub grease: bool, pub max_amplification_factor: usize, pub ack_delay_exponent: u64, pub max_ack_delay: u64, pub max_path_challenge_recv_queue_len: usize, pub stateless_reset_token: Option<u128>, pub disable_dcid_reuse: bool, pub track_unknown_transport_parameters: Option<usize>,
}
Expand description

QUIC configuration parameters.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§alpn: Vec<Vec<u8>>

Configures the list of supported application protocols.

Defaults to [b"h3"].

§enable_dgram: bool

Configures whether to enable DATAGRAM frame support. H3 connections copy this setting from the underlying QUIC connection.

Defaults to true.

§dgram_recv_max_queue_len: usize

Max queue length for received DATAGRAM frames.

Defaults to 2^16.

§dgram_send_max_queue_len: usize

Max queue length for sending DATAGRAM frames.

Defaults to 2^16.

§initial_max_data: u64

Sets the initial_max_data transport parameter.

Defaults to 10 MB.

§initial_max_stream_data_bidi_local: u64

Sets the initial_max_stream_data_bidi_local transport parameter.

Defaults to 1 MB.

§initial_max_stream_data_bidi_remote: u64

Sets the initial_max_stream_data_bidi_remote transport parameter.

Defaults to 1 MB.

§initial_max_stream_data_uni: u64

Sets the initial_max_stream_data_uni transport parameter.

Defaults to 1 MB.

§initial_max_streams_bidi: u64

Sets the initial_max_streams_bidi transport parameter.

Defaults to 100.

§initial_max_streams_uni: u64

Sets the initial_max_streams_uni transport parameter.

Defaults to 100.

§max_idle_timeout: Option<Duration>

Configures the max idle timeout of the connection in milliseconds. The real idle timeout is the minimum of this and the peer’s max_idle_timeout.

Defaults to 56 seconds.

§disable_active_migration: bool

Configures whether the local endpoint supports active connection migration.

Defaults to true (meaning disabled).

§active_connection_id_limit: u64

Sets the active_connection_id_limit transport parameter.

Defaults to 2. Note that values less than 2 will be ignored.

§max_recv_udp_payload_size: usize

Sets the maximum incoming UDP payload size.

Defaults to 1350 bytes.

§max_send_udp_payload_size: usize

Sets the maximum outgoing UDP payload size.

Defaults to 1350 bytes.

§disable_client_ip_validation: bool

Whether to validate client IPs in QUIC initials.

If set to true, any received QUIC initial will immediately spawn a connection and start crypto operations for the handshake. Otherwise, the client is asked to execute a stateless retry first (the default).

§keylog_file: Option<String>

Path to a file in which TLS secrets will be logged in SSLKEYLOGFILE format.

§qlog_dir: Option<String>

Path to a directory where QLOG files will be saved.

§cc_algorithm: String

Congestion control algorithm to use.

For available values, see CongestionControlAlgorithm.

Defaults to cubic.

§initial_congestion_window_packets: usize

The default initial congestion window size in terms of packet count.

Defaults to 10.

§discover_path_mtu: bool

Configures whether to do path MTU discovery.

Defaults to false.

§enable_hystart: bool

Whether to use HyStart++ (only with cubic and reno CC).

Defaults to true.

§enable_pacing: bool

Optionally enables pacing for outgoing packets.

Note: this also requires pacing-compatible SocketCapabilities.

§max_pacing_rate: Option<u64>

Sets the max value for pacing rate.

By default, there is no limit.

§enable_expensive_packet_count_metrics: bool

Optionally enables expensive versions of the accepted_initial_quic_packet_count and rejected_initial_quic_packet_count metrics.

The expensive versions add a label for the peer IP subnet (/24 for IPv4, /32 for IPv6). They thus generate many more time series if peers are arbitrary eyeballs from the global Internet.

§capture_quiche_logs: bool

Forwards quiche logs into the logging system currently used by [foundations].

Defaults to false.

§Warning

This should only be used for local debugging. quiche can emit lots (and lots, and lots) of logs (the TRACE level emits a log record for every packet and frame) and you can very easily overwhelm your logging pipeline.

§handshake_timeout: Option<Duration>

A timeout for the QUIC handshake, in milliseconds.

Disabled by default.

§listen_backlog: usize

The maximum number of newly-created connections that will be queued for the application to receive. Not applicable to client-side usage.

Defaults to 1024 connections.

§verify_peer: bool

Whether or not to verify the peer’s certificate.

Defaults to false, meaning no peer verification is performed. Note that clients should usually set this value to true - see verify_peer() for more.

§max_connection_window: u64

The maximum size of the receiver connection flow control window.

Defaults to 24MB.

§max_stream_window: u64

The maximum size of the receiveer stream flow control window.

Defaults to 16MB.

§grease: bool

Configures whether to send GREASE values.

Defaults to true.

§max_amplification_factor: usize

Sets the anti-amplification limit factor.

Defaults to 3.

§ack_delay_exponent: u64

Sets the ack_delay_exponent transport parameter.

Defaults to 3.

§max_ack_delay: u64

Sets the max_ack_delay transport parameter.

Defaults to 25.

§max_path_challenge_recv_queue_len: usize

Configures the max number of queued received PATH_CHALLENGE frames.

Defaults to 3.

§stateless_reset_token: Option<u128>

Sets the initial stateless reset token.

Note that this applies only to server-side connections - on client-side connections, this is a no-op.

Defaults to None.

§disable_dcid_reuse: bool

Sets whether the QUIC connection should avoid reusing DCIDs over different paths.

Defaults to false. See set_disable_dcid_reuse() for more.

§track_unknown_transport_parameters: Option<usize>

Specifies the number of bytes used to track unknown transport parameters.

Defaults to None, e.g., unknown transport parameters will not be tracked. See enable_track_unknown_transport_parameters() for more.

Trait Implementations§

Source§

impl Clone for QuicSettings

Source§

fn clone(&self) -> QuicSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QuicSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for QuicSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for QuicSettings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for QuicSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Settings for QuicSettings

Source§

fn add_docs( &self, parent_key: &[String], docs: &mut HashMap<Vec<String>, &'static [&'static str]>, )

Add Rust doc comments for the settings fields. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,