Struct s2n_quic_transport::connection::Limits

source ·
pub struct Limits { /* private fields */ }
Expand description

re-export core

Implementations§

source§

impl Limits

source

pub const fn new() -> Limits

source

pub fn with_data_window(self, value: u64) -> Result<Limits, ValidationError>

source

pub fn with_bidirectional_local_data_window( self, value: u64 ) -> Result<Limits, ValidationError>

source

pub fn with_bidirectional_remote_data_window( self, value: u64 ) -> Result<Limits, ValidationError>

source

pub fn with_unidirectional_data_window( self, value: u64 ) -> Result<Limits, ValidationError>

source

pub fn with_max_idle_timeout( self, value: Duration ) -> Result<Limits, ValidationError>

source

pub fn with_max_open_bidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>

👎Deprecated: use with_max_open_local_bidirectional_streams and with_max_open_remote_bidirectional_streams instead

Sets both the max local and remote limits for bidirectional streams.

source

pub fn with_max_open_local_bidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>

Sets the max local limits for bidirectional streams

The value set is used instead of with_max_open_bidirectional_streams when set.

source

pub fn with_max_open_remote_bidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>

Sets the max remote limits for bidirectional streams.

The value set is used instead of with_max_open_bidirectional_streams when set.

source

pub fn with_max_open_local_unidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>

source

pub fn with_max_open_remote_unidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>

source

pub fn with_max_ack_delay( self, value: Duration ) -> Result<Limits, ValidationError>

source

pub fn with_max_active_connection_ids( self, value: u64 ) -> Result<Limits, ValidationError>

source

pub fn with_ack_elicitation_interval( self, value: u8 ) -> Result<Limits, ValidationError>

source

pub fn with_max_ack_ranges(self, value: u8) -> Result<Limits, ValidationError>

source

pub fn with_max_send_buffer_size( self, value: u32 ) -> Result<Limits, ValidationError>

Sets the maximum send buffer size for a Stream

The send buffer contains unacknowledged application data. Constraining the maximum size of this buffer limits the amount of memory a given Stream may consume. On high bandwidth/high RTT connections this may act as a bottleneck, as the connection may be waiting for data to be acknowledged by the peer before allowing more data to be sent. Increasing this value should be carefully weighed against the potential downsides of additional memory utilization as well as increased latency due to the capacity of the send buffer exceeding the rate at which the network link and peer are able to drain from it. Ideally, the max_send_buffer_size is configured to the minimum value that can support the throughput requirements for the connection.

source

pub fn with_max_handshake_duration( self, value: Duration ) -> Result<Limits, ValidationError>

source

pub fn with_max_keep_alive_period( self, value: Duration ) -> Result<Limits, ValidationError>

source

pub fn with_active_connection_migration( self, enabled: bool ) -> Result<Limits, ValidationError>

Sets whether active connection migration is supported for a server endpoint (default: true)

If set to false, the disable_active_migration transport parameter will be sent to the peer, and any attempt by the peer to perform an active connection migration will be ignored.

source

pub fn with_initial_round_trip_time( self, value: Duration ) -> Result<Limits, ValidationError>

Sets the initial round trip time (RTT) for use in recovery mechanisms prior to measuring an actual RTT sample.

This is useful for environments where RTTs are mostly predictable (e.g. data centers) and are much lower than the default 333 milliseconds.

Trait Implementations§

source§

impl Clone for Limits

source§

fn clone(&self) -> Limits

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Limits

source§

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

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

impl Default for Limits

source§

fn default() -> Limits

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

impl Limiter for Limits

Implement Limiter for a Limits struct

source§

fn on_connection(&mut self, _into: &ConnectionInfo<'_>) -> Limits

source§

impl Copy for Limits

Auto Trait Implementations§

§

impl Freeze for Limits

§

impl RefUnwindSafe for Limits

§

impl Send for Limits

§

impl Sync for Limits

§

impl Unpin for Limits

§

impl UnwindSafe for Limits

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> 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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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.
source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

source§

fn upcast(self) -> T

source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

source§

fn upcast_from(value: Counter<T, B>) -> T