Struct TransportParameters
pub struct TransportParameters {Show 24 fields
pub max_idle_timeout: VarInt,
pub max_udp_payload_size: VarInt,
pub initial_max_data: VarInt,
pub initial_max_stream_data_bidi_local: VarInt,
pub initial_max_stream_data_bidi_remote: VarInt,
pub initial_max_stream_data_uni: VarInt,
pub initial_max_streams_bidi: VarInt,
pub initial_max_streams_uni: VarInt,
pub ack_delay_exponent: VarInt,
pub max_ack_delay: VarInt,
pub active_connection_id_limit: VarInt,
pub disable_active_migration: bool,
pub max_datagram_frame_size: Option<VarInt>,
pub initial_src_cid: Option<ConnectionId>,
pub grease_quic_bit: bool,
pub min_ack_delay: Option<VarInt>,
pub version_information: Option<VersionInformation>,
pub original_dst_cid: Option<ConnectionId>,
pub retry_src_cid: Option<ConnectionId>,
pub stateless_reset_token: Option<ResetToken>,
pub preferred_address: Option<PreferredAddress>,
pub grease_transport_parameter: Option<ReservedTransportParameter>,
pub extra: Vec<(u64, Vec<u8>)>,
pub write_plan: Option<Vec<WriteSlot>>,
}quic only.Expand description
Transport parameters used to negotiate connection-level preferences between peers
Fields§
§max_idle_timeout: VarIntMilliseconds, disabled if zero
max_udp_payload_size: VarIntLimits the size of UDP payloads that the endpoint is willing to receive
initial_max_data: VarIntInitial value for the maximum amount of data that can be sent on the connection
initial_max_stream_data_bidi_local: VarIntInitial flow control limit for locally-initiated bidirectional streams
initial_max_stream_data_bidi_remote: VarIntInitial flow control limit for peer-initiated bidirectional streams
initial_max_stream_data_uni: VarIntInitial flow control limit for unidirectional streams
initial_max_streams_bidi: VarIntInitial maximum number of bidirectional streams the peer may initiate
initial_max_streams_uni: VarIntInitial maximum number of unidirectional streams the peer may initiate
ack_delay_exponent: VarIntExponent used to decode the ACK Delay field in the ACK frame
max_ack_delay: VarIntMaximum amount of time in milliseconds by which the endpoint will delay sending acknowledgments
active_connection_id_limit: VarIntMaximum number of connection IDs from the peer that an endpoint is willing to store
disable_active_migration: boolDoes the endpoint support active connection migration
max_datagram_frame_size: Option<VarInt>Maximum size for datagram frames
initial_src_cid: Option<ConnectionId>The value that the endpoint included in the Source Connection ID field of the first Initial packet it sends for the connection
grease_quic_bit: boolThe endpoint is willing to receive QUIC packets containing any value for the fixed bit
min_ack_delay: Option<VarInt>Minimum amount of time in microseconds by which the endpoint is able to delay sending acknowledgments
If a value is provided, it implies that the endpoint supports QUIC Acknowledgement Frequency
version_information: Option<VersionInformation>The version the endpoint chose and the versions it can work with (RFC 9368 §3)
original_dst_cid: Option<ConnectionId>The value of the Destination Connection ID field from the first Initial packet sent by the client
retry_src_cid: Option<ConnectionId>The value that the server included in the Source Connection ID field of a Retry packet
stateless_reset_token: Option<ResetToken>Token used by the client to verify a stateless reset from the server
preferred_address: Option<PreferredAddress>The server’s preferred address for communication after handshake completion
grease_transport_parameter: Option<ReservedTransportParameter>The randomly generated reserved transport parameter to sustain future extensibility of transport parameter extensions. When present, it is included during serialization but ignored during deserialization.
extra: Vec<(u64, Vec<u8>)>Parameters this crate does not interpret, written as given (a profile’s extras).
write_plan: Option<Vec<WriteSlot>>The order in which transport parameters are serialized, one slot per parameter.
Set only for outgoing TransportParameters; None for received ones.
Implementations§
§impl TransportParameters
impl TransportParameters
pub fn default() -> TransportParameters
pub fn default() -> TransportParameters
Standard defaults, used if the peer does not supply a given parameter.
§impl TransportParameters
impl TransportParameters
pub fn plan(&self, order: &ParameterOrder, rng: &mut impl Rng) -> Vec<WriteSlot>
pub fn plan(&self, order: &ParameterOrder, rng: &mut impl Rng) -> Vec<WriteSlot>
The order to write in: the profile’s, with what it does not name after it.
pub fn validate_resumption_from(
&self,
cached: &TransportParameters,
) -> Result<(), Error>
pub fn validate_resumption_from( &self, cached: &TransportParameters, ) -> Result<(), Error>
Check that these parameters are legal when resuming from certain cached parameters
Trait Implementations§
§impl<'arbitrary> Arbitrary<'arbitrary> for TransportParameters
Available on crate feature fuzz-utils only.
impl<'arbitrary> Arbitrary<'arbitrary> for TransportParameters
fuzz-utils only.§fn arbitrary(
u: &mut Unstructured<'arbitrary>,
) -> Result<TransportParameters, Error>
fn arbitrary( u: &mut Unstructured<'arbitrary>, ) -> Result<TransportParameters, Error>
Self from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self from the entirety of the given
unstructured data. Read more§impl Clone for TransportParameters
impl Clone for TransportParameters
§fn clone(&self) -> TransportParameters
fn clone(&self) -> TransportParameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TransportParameters
impl Debug for TransportParameters
impl Eq for TransportParameters
§impl PartialEq for TransportParameters
impl PartialEq for TransportParameters
impl StructuralPartialEq for TransportParameters
Auto Trait Implementations§
impl Freeze for TransportParameters
impl RefUnwindSafe for TransportParameters
impl Send for TransportParameters
impl Sync for TransportParameters
impl Unpin for TransportParameters
impl UnsafeUnpin for TransportParameters
impl UnwindSafe for TransportParameters
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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> ⓘ
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> ⓘ
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more