pub struct Limits { /* private fields */ }
Implementations§
source§impl Limits
impl Limits
pub const fn new() -> Limits
pub fn with_data_window(self, value: u64) -> Result<Limits, ValidationError>
pub fn with_bidirectional_local_data_window( self, value: u64 ) -> Result<Limits, ValidationError>
pub fn with_bidirectional_remote_data_window( self, value: u64 ) -> Result<Limits, ValidationError>
pub fn with_unidirectional_data_window( self, value: u64 ) -> Result<Limits, ValidationError>
pub fn with_max_idle_timeout( self, value: Duration ) -> Result<Limits, ValidationError>
sourcepub 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
pub fn with_max_open_bidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>
Sets both the max local and remote limits for bidirectional streams.
sourcepub fn with_max_open_local_bidirectional_streams(
self,
value: u64
) -> Result<Limits, ValidationError>
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.
sourcepub fn with_max_open_remote_bidirectional_streams(
self,
value: u64
) -> Result<Limits, ValidationError>
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.
pub fn with_max_open_local_unidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>
pub fn with_max_open_remote_unidirectional_streams( self, value: u64 ) -> Result<Limits, ValidationError>
pub fn with_max_ack_delay( self, value: Duration ) -> Result<Limits, ValidationError>
pub fn with_max_active_connection_ids( self, value: u64 ) -> Result<Limits, ValidationError>
pub fn with_ack_elicitation_interval( self, value: u8 ) -> Result<Limits, ValidationError>
pub fn with_max_ack_ranges(self, value: u8) -> Result<Limits, ValidationError>
sourcepub fn with_max_send_buffer_size(
self,
value: u32
) -> Result<Limits, ValidationError>
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.
pub fn with_max_handshake_duration( self, value: Duration ) -> Result<Limits, ValidationError>
pub fn with_max_keep_alive_period( self, value: Duration ) -> Result<Limits, ValidationError>
sourcepub fn with_active_connection_migration(
self,
enabled: bool
) -> Result<Limits, ValidationError>
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.
sourcepub fn with_initial_round_trip_time(
self,
value: Duration
) -> Result<Limits, ValidationError>
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 Limiter for Limits
impl Limiter for Limits
Implement Limiter for a Limits struct