diff --git a/pr/531/docs/bench/fn.connect_client.html b/pr/531/docs/bench/fn.connect_client.html index db1c46780..1f4edbfc9 100644 --- a/pr/531/docs/bench/fn.connect_client.html +++ b/pr/531/docs/bench/fn.connect_client.html @@ -2,5 +2,5 @@ server_addr: SocketAddr, server_cert: CertificateDer<'_>, opt: Opt, -) -> Result<(Endpoint, Connection)>
Expand description

Create a client endpoint and client connection

+) -> Result<(Endpoint, Connection)>
Expand description

Create a client endpoint and client connection

\ No newline at end of file diff --git a/pr/531/docs/bench/fn.drain_stream.html b/pr/531/docs/bench/fn.drain_stream.html index 419a7887d..1156135bd 100644 --- a/pr/531/docs/bench/fn.drain_stream.html +++ b/pr/531/docs/bench/fn.drain_stream.html @@ -1,4 +1,4 @@ drain_stream in bench - Rust

drain_stream

Function drain_stream 

Source
pub async fn drain_stream(
-    stream: RecvStream,
+    stream: RecvStream,
     read_unordered: bool,
 ) -> Result<usize>
\ No newline at end of file diff --git a/pr/531/docs/bench/fn.send_data_on_stream.html b/pr/531/docs/bench/fn.send_data_on_stream.html index e0ee604a7..dbdfc4d28 100644 --- a/pr/531/docs/bench/fn.send_data_on_stream.html +++ b/pr/531/docs/bench/fn.send_data_on_stream.html @@ -1,4 +1,4 @@ send_data_on_stream in bench - Rust

send_data_on_stream

Function send_data_on_stream 

Source
pub async fn send_data_on_stream(
-    stream: &mut SendStream,
+    stream: &mut SendStream,
     stream_size: u64,
 ) -> Result<()>
\ No newline at end of file diff --git a/pr/531/docs/bench/fn.server_endpoint.html b/pr/531/docs/bench/fn.server_endpoint.html index f1d25c09c..2b7bac5c1 100644 --- a/pr/531/docs/bench/fn.server_endpoint.html +++ b/pr/531/docs/bench/fn.server_endpoint.html @@ -3,5 +3,5 @@ cert: CertificateDer<'static>, key: PrivateKeyDer<'static>, opt: &Opt, -) -> (SocketAddr, Endpoint)
Expand description

Creates a server endpoint which runs on the given runtime

+) -> (SocketAddr, Endpoint)
Expand description

Creates a server endpoint which runs on the given runtime

\ No newline at end of file diff --git a/pr/531/docs/bench/fn.transport_config.html b/pr/531/docs/bench/fn.transport_config.html index 5d443f5a8..3bbf46783 100644 --- a/pr/531/docs/bench/fn.transport_config.html +++ b/pr/531/docs/bench/fn.transport_config.html @@ -1 +1 @@ -transport_config in bench - Rust

transport_config

Function transport_config 

Source
pub fn transport_config(opt: &Opt) -> TransportConfig
\ No newline at end of file +transport_config in bench - Rust

transport_config

Function transport_config 

Source
pub fn transport_config(opt: &Opt) -> TransportConfig
\ No newline at end of file diff --git a/pr/531/docs/help.html b/pr/531/docs/help.html index cda0c7f93..09d0ca8e7 100644 --- a/pr/531/docs/help.html +++ b/pr/531/docs/help.html @@ -1 +1 @@ -Help

All

Rustdoc help

Back
\ No newline at end of file +Help

All

Rustdoc help

Back
\ No newline at end of file diff --git a/pr/531/docs/noq/congestion/index.html b/pr/531/docs/noq/congestion/index.html index 7a948be8d..bfd676f25 100644 --- a/pr/531/docs/noq/congestion/index.html +++ b/pr/531/docs/noq/congestion/index.html @@ -1,2 +1,2 @@ -noq::congestion - Rust

Module congestion

Module congestion 

Expand description

Logic for controlling the rate at which data is sent

+noq::congestion - Rust

Module congestion

Module congestion 

Source
Expand description

Logic for controlling the rate at which data is sent

Structs§

Bbr
Experimental! Use at your own risk.
BbrConfig
Configuration for the Bbr congestion controller
ControllerMetrics
Common congestion controller metrics
Cubic
The RFC8312 congestion controller, as widely used for TCP
CubicConfig
Configuration for the Cubic congestion controller
NewReno
A simple, standard congestion controller
NewRenoConfig
Configuration for the NewReno congestion controller

Traits§

Controller
Common interface for different congestion controllers
ControllerFactory
Constructs controllers on demand
\ No newline at end of file diff --git a/pr/531/docs/noq/congestion/struct.Bbr.html b/pr/531/docs/noq/congestion/struct.Bbr.html index db52082ef..9e92b09c0 100644 --- a/pr/531/docs/noq/congestion/struct.Bbr.html +++ b/pr/531/docs/noq/congestion/struct.Bbr.html @@ -1,30 +1,30 @@ -Bbr in noq::congestion - Rust

Bbr

Struct Bbr 

pub struct Bbr { /* private fields */ }
Expand description

Experimental! Use at your own risk.

+Bbr in noq::congestion - Rust

Bbr

Struct Bbr 

Source
pub struct Bbr { /* private fields */ }
Expand description

Experimental! Use at your own risk.

Aims for reduced buffer bloat and improved performance over high bandwidth-delay product networks. Based on google’s quiche implementation https://source.chromium.org/chromium/chromium/src/+/master:net/third_party/quiche/src/quic/core/congestion_control/bbr_sender.cc of BBR https://datatracker.ietf.org/doc/html/draft-cardwell-iccrg-bbr-congestion-control. More discussion and links at https://groups.google.com/g/bbr-dev.

-

Implementations§

§

impl Bbr

pub fn new(config: Arc<BbrConfig>, current_mtu: u16) -> Bbr

Construct a state using the given config and current time now

-

Trait Implementations§

§

impl Clone for Bbr

§

fn clone(&self) -> Bbr

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

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

Performs copy-assignment from source. Read more
§

impl Controller for Bbr

§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent
§

fn on_ack( +

Implementations§

Source§

impl Bbr

Source

pub fn new(config: Arc<BbrConfig>, current_mtu: u16) -> Bbr

Construct a state using the given config and current time now

+

Trait Implementations§

Source§

impl Clone for Bbr

Source§

fn clone(&self) -> Bbr

Returns a duplicate 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 Controller for Bbr

Source§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent
Source§

fn on_ack( &mut self, now: Instant, sent: Instant, bytes: u64, app_limited: bool, - rtt: &RttEstimator, -)

Packet deliveries were confirmed Read more
§

fn on_end_acks( + rtt: &RttEstimator, +)

Packet deliveries were confirmed Read more
Source§

fn on_end_acks( &mut self, now: Instant, in_flight: u64, app_limited: bool, largest_packet_num_acked: Option<u64>, -)

Packets are acked in batches, all with the same now argument. This indicates one of those batches has completed.
§

fn on_congestion_event( +)

Packets are acked in batches, all with the same now argument. This indicates one of those batches has completed.
Source§

fn on_congestion_event( &mut self, _now: Instant, _sent: Instant, _is_persistent_congestion: bool, _is_ecn: bool, lost_bytes: u64, -)

Packets were deemed lost or marked congested Read more
§

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated
§

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight
§

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled
§

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state
§

fn initial_window(&self) -> u64

Initial congestion window
§

fn into_any(self: Box<Bbr>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details
§

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost Read more
§

impl Debug for Bbr

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Bbr

§

impl RefUnwindSafe for Bbr

§

impl Send for Bbr

§

impl Sync for Bbr

§

impl Unpin for Bbr

§

impl UnwindSafe for Bbr

Blanket Implementations§

Source§

impl<T> Any for T
where +)

Packets were deemed lost or marked congested Read more
Source§

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated
Source§

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight
Source§

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled
Source§

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state
Source§

fn initial_window(&self) -> u64

Initial congestion window
Source§

fn into_any(self: Box<Bbr>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details
Source§

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost Read more
Source§

impl Debug for Bbr

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Bbr

§

impl RefUnwindSafe for Bbr

§

impl Send for Bbr

§

impl Sync for Bbr

§

impl Unpin for Bbr

§

impl UnwindSafe for Bbr

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 diff --git a/pr/531/docs/noq/congestion/struct.BbrConfig.html b/pr/531/docs/noq/congestion/struct.BbrConfig.html index f02aefcc7..1cbda7adb 100644 --- a/pr/531/docs/noq/congestion/struct.BbrConfig.html +++ b/pr/531/docs/noq/congestion/struct.BbrConfig.html @@ -1,11 +1,11 @@ -BbrConfig in noq::congestion - Rust

BbrConfig

Struct BbrConfig 

pub struct BbrConfig { /* private fields */ }
Expand description

Configuration for the Bbr congestion controller

-

Implementations§

§

impl BbrConfig

pub fn initial_window(&mut self, value: u64) -> &mut BbrConfig

Default limit on the amount of outstanding data in bytes.

+BbrConfig in noq::congestion - Rust

BbrConfig

Struct BbrConfig 

Source
pub struct BbrConfig { /* private fields */ }
Expand description

Configuration for the Bbr congestion controller

+

Implementations§

Source§

impl BbrConfig

Source

pub fn initial_window(&mut self, value: u64) -> &mut BbrConfig

Default limit on the amount of outstanding data in bytes.

Recommended value: min(10 * max_datagram_size, max(2 * max_datagram_size, 14720))

-

Trait Implementations§

§

impl Clone for BbrConfig

§

fn clone(&self) -> BbrConfig

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

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

Performs copy-assignment from source. Read more
§

impl ControllerFactory for BbrConfig

§

fn build( +

Trait Implementations§

Source§

impl Clone for BbrConfig

Source§

fn clone(&self) -> BbrConfig

Returns a duplicate 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 ControllerFactory for BbrConfig

Source§

fn build( self: Arc<BbrConfig>, _now: Instant, current_mtu: u16, -) -> Box<dyn Controller>

Construct a fresh Controller
§

impl Debug for BbrConfig

§

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

Formats the value using the given formatter. Read more
§

impl Default for BbrConfig

§

fn default() -> BbrConfig

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Box<dyn Controller>

Construct a fresh Controller
Source§

impl Debug for BbrConfig

Source§

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

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

impl Default for BbrConfig

Source§

fn default() -> BbrConfig

Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/congestion/struct.ControllerMetrics.html b/pr/531/docs/noq/congestion/struct.ControllerMetrics.html index e2c4d4b9d..83727dbb4 100644 --- a/pr/531/docs/noq/congestion/struct.ControllerMetrics.html +++ b/pr/531/docs/noq/congestion/struct.ControllerMetrics.html @@ -1,4 +1,4 @@ -ControllerMetrics in noq::congestion - Rust

ControllerMetrics

Struct ControllerMetrics 

#[non_exhaustive]
pub struct ControllerMetrics { +ControllerMetrics in noq::congestion - Rust

ControllerMetrics

Struct ControllerMetrics 

Source
#[non_exhaustive]
pub struct ControllerMetrics { pub congestion_window: u64, pub ssthresh: Option<u64>, pub pacing_rate: Option<u64>, @@ -6,7 +6,7 @@

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.
§congestion_window: u64

Congestion window (bytes)

§ssthresh: Option<u64>

Slow start threshold (bytes)

§pacing_rate: Option<u64>

Pacing rate (bits/s)

-

Trait Implementations§

§

impl Debug for ControllerMetrics

§

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

Formats the value using the given formatter. Read more
§

impl Default for ControllerMetrics

§

fn default() -> ControllerMetrics

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Trait Implementations§

Source§

impl Debug for ControllerMetrics

Source§

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

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

impl Default for ControllerMetrics

Source§

fn default() -> ControllerMetrics

Returns the “default value” for a type. 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/pr/531/docs/noq/congestion/struct.Cubic.html b/pr/531/docs/noq/congestion/struct.Cubic.html index 1480d6b4a..cbf414f0d 100644 --- a/pr/531/docs/noq/congestion/struct.Cubic.html +++ b/pr/531/docs/noq/congestion/struct.Cubic.html @@ -1,26 +1,26 @@ -Cubic in noq::congestion - Rust

Cubic

Struct Cubic 

pub struct Cubic { /* private fields */ }
Expand description

The RFC8312 congestion controller, as widely used for TCP

-

Implementations§

§

impl Cubic

pub fn new(config: Arc<CubicConfig>, _now: Instant, current_mtu: u16) -> Cubic

Construct a state using the given config and current time now

-

Trait Implementations§

§

impl Clone for Cubic

§

fn clone(&self) -> Cubic

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

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

Performs copy-assignment from source. Read more
§

impl Controller for Cubic

§

fn on_ack( +Cubic in noq::congestion - Rust

Cubic

Struct Cubic 

Source
pub struct Cubic { /* private fields */ }
Expand description

The RFC8312 congestion controller, as widely used for TCP

+

Implementations§

Source§

impl Cubic

Source

pub fn new(config: Arc<CubicConfig>, _now: Instant, current_mtu: u16) -> Cubic

Construct a state using the given config and current time now

+

Trait Implementations§

Source§

impl Clone for Cubic

Source§

fn clone(&self) -> Cubic

Returns a duplicate 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 Controller for Cubic

Source§

fn on_ack( &mut self, now: Instant, sent: Instant, bytes: u64, app_limited: bool, - rtt: &RttEstimator, -)

Packet deliveries were confirmed Read more
§

fn on_congestion_event( + rtt: &RttEstimator, +)

Packet deliveries were confirmed Read more
Source§

fn on_congestion_event( &mut self, now: Instant, sent: Instant, is_persistent_congestion: bool, is_ecn: bool, _lost_bytes: u64, -)

Packets were deemed lost or marked congested Read more
§

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost Read more
§

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated
§

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight
§

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled
§

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state
§

fn initial_window(&self) -> u64

Initial congestion window
§

fn into_any(self: Box<Cubic>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details
§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent
§

fn on_end_acks( +)

Packets were deemed lost or marked congested Read more
Source§

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost Read more
Source§

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated
Source§

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight
Source§

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled
Source§

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state
Source§

fn initial_window(&self) -> u64

Initial congestion window
Source§

fn into_any(self: Box<Cubic>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details
Source§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent
Source§

fn on_end_acks( &mut self, now: Instant, in_flight: u64, app_limited: bool, largest_packet_num_acked: Option<u64>, -)

Packets are acked in batches, all with the same now argument. This indicates one of those batches has completed.
§

impl Debug for Cubic

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Cubic

§

impl RefUnwindSafe for Cubic

§

impl Send for Cubic

§

impl Sync for Cubic

§

impl Unpin for Cubic

§

impl UnwindSafe for Cubic

Blanket Implementations§

Source§

impl<T> Any for T
where +)

Packets are acked in batches, all with the same now argument. This indicates one of those batches has completed.

Source§

impl Debug for Cubic

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Cubic

§

impl RefUnwindSafe for Cubic

§

impl Send for Cubic

§

impl Sync for Cubic

§

impl Unpin for Cubic

§

impl UnwindSafe for Cubic

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 diff --git a/pr/531/docs/noq/congestion/struct.CubicConfig.html b/pr/531/docs/noq/congestion/struct.CubicConfig.html index 8164541f8..30dd7d958 100644 --- a/pr/531/docs/noq/congestion/struct.CubicConfig.html +++ b/pr/531/docs/noq/congestion/struct.CubicConfig.html @@ -1,11 +1,11 @@ -CubicConfig in noq::congestion - Rust

CubicConfig

Struct CubicConfig 

pub struct CubicConfig { /* private fields */ }
Expand description

Configuration for the Cubic congestion controller

-

Implementations§

§

impl CubicConfig

pub fn initial_window(&mut self, value: u64) -> &mut CubicConfig

Default limit on the amount of outstanding data in bytes.

+CubicConfig in noq::congestion - Rust

CubicConfig

Struct CubicConfig 

Source
pub struct CubicConfig { /* private fields */ }
Expand description

Configuration for the Cubic congestion controller

+

Implementations§

Source§

impl CubicConfig

Source

pub fn initial_window(&mut self, value: u64) -> &mut CubicConfig

Default limit on the amount of outstanding data in bytes.

Recommended value: min(10 * max_datagram_size, max(2 * max_datagram_size, 14720))

-

Trait Implementations§

§

impl Clone for CubicConfig

§

fn clone(&self) -> CubicConfig

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

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

Performs copy-assignment from source. Read more
§

impl ControllerFactory for CubicConfig

§

fn build( +

Trait Implementations§

Source§

impl Clone for CubicConfig

Source§

fn clone(&self) -> CubicConfig

Returns a duplicate 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 ControllerFactory for CubicConfig

Source§

fn build( self: Arc<CubicConfig>, now: Instant, current_mtu: u16, -) -> Box<dyn Controller>

Construct a fresh Controller
§

impl Debug for CubicConfig

§

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

Formats the value using the given formatter. Read more
§

impl Default for CubicConfig

§

fn default() -> CubicConfig

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Box<dyn Controller>

Construct a fresh Controller
Source§

impl Debug for CubicConfig

Source§

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

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

impl Default for CubicConfig

Source§

fn default() -> CubicConfig

Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/congestion/struct.NewReno.html b/pr/531/docs/noq/congestion/struct.NewReno.html index 4a24a3366..db55ce790 100644 --- a/pr/531/docs/noq/congestion/struct.NewReno.html +++ b/pr/531/docs/noq/congestion/struct.NewReno.html @@ -1,30 +1,30 @@ -NewReno in noq::congestion - Rust

NewReno

Struct NewReno 

pub struct NewReno { /* private fields */ }
Expand description

A simple, standard congestion controller

-

Implementations§

§

impl NewReno

pub fn new( +NewReno in noq::congestion - Rust

NewReno

Struct NewReno 

Source
pub struct NewReno { /* private fields */ }
Expand description

A simple, standard congestion controller

+

Implementations§

Source§

impl NewReno

Source

pub fn new( config: Arc<NewRenoConfig>, now: Instant, current_mtu: u16, ) -> NewReno

Construct a state using the given config and current time now

-

Trait Implementations§

§

impl Clone for NewReno

§

fn clone(&self) -> NewReno

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

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

Performs copy-assignment from source. Read more
§

impl Controller for NewReno

§

fn on_ack( +

Trait Implementations§

Source§

impl Clone for NewReno

Source§

fn clone(&self) -> NewReno

Returns a duplicate 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 Controller for NewReno

Source§

fn on_ack( &mut self, _now: Instant, sent: Instant, bytes: u64, app_limited: bool, - _rtt: &RttEstimator, -)

Packet deliveries were confirmed Read more
§

fn on_congestion_event( + _rtt: &RttEstimator, +)

Packet deliveries were confirmed Read more
Source§

fn on_congestion_event( &mut self, now: Instant, sent: Instant, is_persistent_congestion: bool, _is_ecn: bool, _lost_bytes: u64, -)

Packets were deemed lost or marked congested Read more
§

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated
§

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight
§

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled
§

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state
§

fn initial_window(&self) -> u64

Initial congestion window
§

fn into_any(self: Box<NewReno>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details
§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent
§

fn on_end_acks( +)

Packets were deemed lost or marked congested Read more
Source§

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated
Source§

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight
Source§

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled
Source§

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state
Source§

fn initial_window(&self) -> u64

Initial congestion window
Source§

fn into_any(self: Box<NewReno>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details
Source§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent
Source§

fn on_end_acks( &mut self, now: Instant, in_flight: u64, app_limited: bool, largest_packet_num_acked: Option<u64>, -)

Packets are acked in batches, all with the same now argument. This indicates one of those batches has completed.
§

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost Read more
§

impl Debug for NewReno

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +)

Packets are acked in batches, all with the same now argument. This indicates one of those batches has completed.
Source§

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost Read more
Source§

impl Debug for NewReno

Source§

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

Formats the value using the given formatter. 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 diff --git a/pr/531/docs/noq/congestion/struct.NewRenoConfig.html b/pr/531/docs/noq/congestion/struct.NewRenoConfig.html index 4fba8cb97..45bf5627e 100644 --- a/pr/531/docs/noq/congestion/struct.NewRenoConfig.html +++ b/pr/531/docs/noq/congestion/struct.NewRenoConfig.html @@ -1,12 +1,12 @@ -NewRenoConfig in noq::congestion - Rust

NewRenoConfig

Struct NewRenoConfig 

pub struct NewRenoConfig { /* private fields */ }
Expand description

Configuration for the NewReno congestion controller

-

Implementations§

§

impl NewRenoConfig

pub fn initial_window(&mut self, value: u64) -> &mut NewRenoConfig

Default limit on the amount of outstanding data in bytes.

+NewRenoConfig in noq::congestion - Rust

NewRenoConfig

Struct NewRenoConfig 

Source
pub struct NewRenoConfig { /* private fields */ }
Expand description

Configuration for the NewReno congestion controller

+

Implementations§

Source§

impl NewRenoConfig

Source

pub fn initial_window(&mut self, value: u64) -> &mut NewRenoConfig

Default limit on the amount of outstanding data in bytes.

Recommended value: min(10 * max_datagram_size, max(2 * max_datagram_size, 14720))

-

pub fn loss_reduction_factor(&mut self, value: f32) -> &mut NewRenoConfig

Reduction in congestion window when a new loss event is detected.

-

Trait Implementations§

§

impl Clone for NewRenoConfig

§

fn clone(&self) -> NewRenoConfig

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

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

Performs copy-assignment from source. Read more
§

impl ControllerFactory for NewRenoConfig

§

fn build( +

Source

pub fn loss_reduction_factor(&mut self, value: f32) -> &mut NewRenoConfig

Reduction in congestion window when a new loss event is detected.

+

Trait Implementations§

Source§

impl Clone for NewRenoConfig

Source§

fn clone(&self) -> NewRenoConfig

Returns a duplicate 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 ControllerFactory for NewRenoConfig

Source§

fn build( self: Arc<NewRenoConfig>, now: Instant, current_mtu: u16, -) -> Box<dyn Controller>

Construct a fresh Controller
§

impl Debug for NewRenoConfig

§

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

Formats the value using the given formatter. Read more
§

impl Default for NewRenoConfig

§

fn default() -> NewRenoConfig

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

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Box<dyn Controller>

Construct a fresh Controller
Source§

impl Debug for NewRenoConfig

Source§

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

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

impl Default for NewRenoConfig

Source§

fn default() -> NewRenoConfig

Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/congestion/trait.Controller.html b/pr/531/docs/noq/congestion/trait.Controller.html index f73e6604d..e28ccb4d5 100644 --- a/pr/531/docs/noq/congestion/trait.Controller.html +++ b/pr/531/docs/noq/congestion/trait.Controller.html @@ -1,4 +1,4 @@ -Controller in noq::congestion - Rust

Controller

Trait Controller 

pub trait Controller:
+Controller in noq::congestion - Rust

Controller

Trait Controller 

Source
pub trait Controller:
     Send
     + Sync
     + Debug {
@@ -25,7 +25,7 @@
         sent: Instant,
         bytes: u64,
         app_limited: bool,
-        rtt: &RttEstimator,
+        rtt: &RttEstimator,
     ) { ... }
     fn on_end_acks(
         &mut self,
@@ -37,7 +37,7 @@
     fn on_spurious_congestion_event(&mut self) { ... }
     fn metrics(&self) -> ControllerMetrics { ... }
 }
Expand description

Common interface for different congestion controllers

-

Required Methods§

Required Methods§

Source

fn on_congestion_event( &mut self, now: Instant, sent: Instant, @@ -49,31 +49,31 @@ congestion threshold period ending when the most recent packet in this batch was sent were lost. lost_bytes indicates how many bytes were lost. This value will be 0 for ECN triggers.

-

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated

-

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight

-

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state

-

fn initial_window(&self) -> u64

Initial congestion window

-

fn into_any(self: Box<Self>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details

-

Provided Methods§

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent

-

fn on_ack( +

Source

fn on_mtu_update(&mut self, new_mtu: u16)

The known MTU for the current network path has been updated

+
Source

fn window(&self) -> u64

Number of ack-eliciting bytes that may be in flight

+
Source

fn clone_box(&self) -> Box<dyn Controller>

Duplicate the controller’s state

+
Source

fn initial_window(&self) -> u64

Initial congestion window

+
Source

fn into_any(self: Box<Self>) -> Box<dyn Any>

Returns Self for use in down-casting to extract implementation details

+

Provided Methods§

Source

fn on_sent(&mut self, now: Instant, bytes: u64, last_packet_number: u64)

One or more packets were just sent

+
Source

fn on_ack( &mut self, now: Instant, sent: Instant, bytes: u64, app_limited: bool, - rtt: &RttEstimator, + rtt: &RttEstimator, )

Packet deliveries were confirmed

app_limited indicates whether the connection was blocked on outgoing application data prior to receiving these acknowledgements.

-

fn on_end_acks( +

Source

fn on_end_acks( &mut self, now: Instant, in_flight: u64, app_limited: bool, largest_packet_num_acked: Option<u64>, )

Packets are acked in batches, all with the same now argument. This indicates one of those batches has completed.

-

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost

+
Source

fn on_spurious_congestion_event(&mut self)

Packets were incorrectly deemed lost

This function is called when all packets that were deemed lost (for instance because of packet reordering) are acknowledged after the congestion event was raised.

-

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled

-

Implementors§

\ No newline at end of file +
Source

fn metrics(&self) -> ControllerMetrics

Retrieve implementation-specific metrics used to populate qlog traces when they are enabled

+

Implementors§

\ No newline at end of file diff --git a/pr/531/docs/noq/congestion/trait.ControllerFactory.html b/pr/531/docs/noq/congestion/trait.ControllerFactory.html index 93add5e51..f6dd7b6ee 100644 --- a/pr/531/docs/noq/congestion/trait.ControllerFactory.html +++ b/pr/531/docs/noq/congestion/trait.ControllerFactory.html @@ -1,4 +1,4 @@ -ControllerFactory in noq::congestion - Rust

ControllerFactory

Trait ControllerFactory 

pub trait ControllerFactory {
+ControllerFactory in noq::congestion - Rust

ControllerFactory

Trait ControllerFactory 

Source
pub trait ControllerFactory {
     // Required method
     fn build(
         self: Arc<Self>,
@@ -6,5 +6,5 @@
         current_mtu: u16,
     ) -> Box<dyn Controller>;
 }
Expand description

Constructs controllers on demand

-

Required Methods§

fn build(self: Arc<Self>, now: Instant, current_mtu: u16) -> Box<dyn Controller>

Construct a fresh Controller

-

Implementors§

\ No newline at end of file +

Required Methods§

Source

fn build(self: Arc<Self>, now: Instant, current_mtu: u16) -> Box<dyn Controller>

Construct a fresh Controller

+

Implementors§

\ No newline at end of file diff --git a/pr/531/docs/noq/crypto/index.html b/pr/531/docs/noq/crypto/index.html index fcbfe7a14..3266d8e96 100644 --- a/pr/531/docs/noq/crypto/index.html +++ b/pr/531/docs/noq/crypto/index.html @@ -1,4 +1,4 @@ -noq::crypto - Rust

Module crypto

Module crypto 

Expand description

Traits and implementations for the QUIC cryptography protocol

+noq::crypto - Rust

Module crypto

Module crypto 

Source
Expand description

Traits and implementations for the QUIC cryptography protocol

The protocol logic in noq is contained in types that abstract over the actual cryptographic protocol used. This module contains the traits used for this abstraction layer as well as a single implementation of these traits that uses diff --git a/pr/531/docs/noq/crypto/rustls/index.html b/pr/531/docs/noq/crypto/rustls/index.html index 9ddd76feb..ca1fc066c 100644 --- a/pr/531/docs/noq/crypto/rustls/index.html +++ b/pr/531/docs/noq/crypto/rustls/index.html @@ -1,2 +1,2 @@ -noq::crypto::rustls - Rust

Module rustls

Module rustls 

Expand description

TLS interface based on rustls

+noq::crypto::rustls - Rust

Module rustls

Module rustls 

Source
Expand description

TLS interface based on rustls

Structs§

HandshakeData
Authentication data for (rustls) TLS session
NoInitialCipherSuite
The initial cipher suite (AES-128-GCM-SHA256) is not available
QuicClientConfig
A QUIC-compatible TLS client configuration
QuicServerConfig
A QUIC-compatible TLS server configuration
TlsSession
A rustls TLS session

Enums§

Error
rustls reports protocol errors using this type.
\ No newline at end of file diff --git a/pr/531/docs/noq/crypto/rustls/struct.HandshakeData.html b/pr/531/docs/noq/crypto/rustls/struct.HandshakeData.html index 0335c4da4..7c8e71954 100644 --- a/pr/531/docs/noq/crypto/rustls/struct.HandshakeData.html +++ b/pr/531/docs/noq/crypto/rustls/struct.HandshakeData.html @@ -1,4 +1,4 @@ -HandshakeData in noq::crypto::rustls - Rust

HandshakeData

Struct HandshakeData 

pub struct HandshakeData {
+HandshakeData in noq::crypto::rustls - Rust

HandshakeData

Struct HandshakeData 

Source
pub struct HandshakeData {
     pub protocol: Option<Vec<u8>>,
     pub server_name: Option<String>,
     pub negotiated_key_exchange_group: NamedGroup,
diff --git a/pr/531/docs/noq/crypto/rustls/struct.NoInitialCipherSuite.html b/pr/531/docs/noq/crypto/rustls/struct.NoInitialCipherSuite.html
index a9152156a..4b1d48e9a 100644
--- a/pr/531/docs/noq/crypto/rustls/struct.NoInitialCipherSuite.html
+++ b/pr/531/docs/noq/crypto/rustls/struct.NoInitialCipherSuite.html
@@ -1,8 +1,8 @@
-NoInitialCipherSuite in noq::crypto::rustls - Rust

NoInitialCipherSuite

Struct NoInitialCipherSuite 

pub struct NoInitialCipherSuite { /* private fields */ }
Expand description

The initial cipher suite (AES-128-GCM-SHA256) is not available

+NoInitialCipherSuite in noq::crypto::rustls - Rust

NoInitialCipherSuite

Struct NoInitialCipherSuite 

Source
pub struct NoInitialCipherSuite { /* private fields */ }
Expand description

The initial cipher suite (AES-128-GCM-SHA256) is not available

When the cipher suite is supplied with_initial(), it must be [CipherSuite::TLS13_AES_128_GCM_SHA256]. When the cipher suite is derived from a config’s CryptoProvider, that provider must reference a cipher suite with the same ID.

-

Trait Implementations§

§

impl Clone for NoInitialCipherSuite

§

fn clone(&self) -> NoInitialCipherSuite

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

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

Performs copy-assignment from source. Read more
§

impl Debug for NoInitialCipherSuite

§

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

Formats the value using the given formatter. Read more
§

impl Display for NoInitialCipherSuite

§

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

Formats the value using the given formatter. Read more
§

impl Error for NoInitialCipherSuite

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Trait Implementations§

Source§

impl Clone for NoInitialCipherSuite

Source§

fn clone(&self) -> NoInitialCipherSuite

Returns a duplicate 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 NoInitialCipherSuite

Source§

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

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

impl Display for NoInitialCipherSuite

Source§

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

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

impl Error for NoInitialCipherSuite

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. 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 diff --git a/pr/531/docs/noq/crypto/rustls/struct.QuicClientConfig.html b/pr/531/docs/noq/crypto/rustls/struct.QuicClientConfig.html index 0b97ef82b..284c48f71 100644 --- a/pr/531/docs/noq/crypto/rustls/struct.QuicClientConfig.html +++ b/pr/531/docs/noq/crypto/rustls/struct.QuicClientConfig.html @@ -1,4 +1,4 @@ -QuicClientConfig in noq::crypto::rustls - Rust

QuicClientConfig

Struct QuicClientConfig 

pub struct QuicClientConfig { /* private fields */ }
Expand description

A QUIC-compatible TLS client configuration

+QuicClientConfig in noq::crypto::rustls - Rust

QuicClientConfig

Struct QuicClientConfig 

Source
pub struct QuicClientConfig { /* private fields */ }
Expand description

A QUIC-compatible TLS client configuration

noq implicitly constructs a QuicClientConfig with reasonable defaults within ClientConfig::with_root_certificates() and ClientConfig::try_with_platform_verifier(). Alternatively, QuicClientConfig’s TryFrom implementation can be used to wrap around a @@ -12,20 +12,20 @@ outgoing connections. calling into_0rtt on outgoing connections returns Ok or Err. It typically allows into_0rtt to proceed if it recognizes the server name, and defaults to an in-memory cache of 256 server names.

-

Implementations§

§

impl QuicClientConfig

pub fn with_initial( +

Implementations§

Source§

impl QuicClientConfig

Source

pub fn with_initial( inner: Arc<ClientConfig>, initial: Suite, ) -> Result<QuicClientConfig, NoInitialCipherSuite>

Initialize a QUIC-compatible TLS client configuration with a separate initial cipher suite

This is useful if you want to avoid the initial cipher suite for traffic encryption.

-

pub fn set_alpn_protocols(&mut self, alpn_protocols: Vec<Vec<u8>>)

Updates the set of ALPN protocols configured in the client config.

-

Trait Implementations§

§

impl ClientConfig for QuicClientConfig

Source

pub fn set_alpn_protocols(&mut self, alpn_protocols: Vec<Vec<u8>>)

Updates the set of ALPN protocols configured in the client config.

+

Trait Implementations§

Source§

impl ClientConfig for QuicClientConfig

Source§

fn start_session( &self, version: u32, server_name: &str, - params: &TransportParameters, -) -> Result<Box<dyn Session>, ConnectError>

Start a client session with this configuration
§

impl Clone for QuicClientConfig

§

fn clone(&self) -> QuicClientConfig

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

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

Performs copy-assignment from source. Read more
§

impl TryFrom<Arc<ClientConfig>> for QuicClientConfig

§

type Error = NoInitialCipherSuite

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

fn try_from( + params: &TransportParameters, +) -> Result<Box<dyn Session>, ConnectError>

Start a client session with this configuration
Source§

impl Clone for QuicClientConfig

Source§

fn clone(&self) -> QuicClientConfig

Returns a duplicate 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 TryFrom<Arc<ClientConfig>> for QuicClientConfig

Source§

type Error = NoInitialCipherSuite

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

fn try_from( inner: Arc<ClientConfig>, -) -> Result<QuicClientConfig, <QuicClientConfig as TryFrom<Arc<ClientConfig>>>::Error>

Performs the conversion.
§

impl TryFrom<ClientConfig> for QuicClientConfig

§

type Error = NoInitialCipherSuite

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

fn try_from( +) -> Result<QuicClientConfig, <QuicClientConfig as TryFrom<Arc<ClientConfig>>>::Error>

Performs the conversion.
Source§

impl TryFrom<ClientConfig> for QuicClientConfig

Source§

type Error = NoInitialCipherSuite

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

fn try_from( inner: ClientConfig, ) -> Result<QuicClientConfig, <QuicClientConfig as TryFrom<ClientConfig>>::Error>

Performs the conversion.

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 diff --git a/pr/531/docs/noq/crypto/rustls/struct.QuicServerConfig.html b/pr/531/docs/noq/crypto/rustls/struct.QuicServerConfig.html index 1e7f4f041..66348a7f1 100644 --- a/pr/531/docs/noq/crypto/rustls/struct.QuicServerConfig.html +++ b/pr/531/docs/noq/crypto/rustls/struct.QuicServerConfig.html @@ -1,4 +1,4 @@ -QuicServerConfig in noq::crypto::rustls - Rust

QuicServerConfig

Struct QuicServerConfig 

pub struct QuicServerConfig { /* private fields */ }
Expand description

A QUIC-compatible TLS server configuration

+QuicServerConfig in noq::crypto::rustls - Rust

QuicServerConfig

Struct QuicServerConfig 

Source
pub struct QuicServerConfig { /* private fields */ }
Expand description

A QUIC-compatible TLS server configuration

noq implicitly constructs a QuicServerConfig with reasonable defaults within ServerConfig::with_single_cert(). Alternatively, QuicServerConfig’s TryFrom implementation or with_initial method can be used to wrap around a custom @@ -8,28 +8,28 @@ implementation or with_initial method can be used to wrap around a incoming 0-RTT data. QUIC prohibits max_early_data_size values other than 0 or u32::MAX.

  • The rustls::ServerConfig must have TLS 1.3 support enabled for conversion to succeed.
  • -

    Implementations§

    §

    impl QuicServerConfig

    pub fn with_initial( +

    Implementations§

    Source§

    impl QuicServerConfig

    Source

    pub fn with_initial( inner: Arc<ServerConfig>, initial: Suite, ) -> Result<QuicServerConfig, NoInitialCipherSuite>

    Initialize a QUIC-compatible TLS client configuration with a separate initial cipher suite

    This is useful if you want to avoid the initial cipher suite for traffic encryption.

    -

    pub fn set_alpn_protocols(&mut self, alpn_protocols: Vec<Vec<u8>>)

    Updates the set of ALPN protocols configured in the server config.

    -

    Trait Implementations§

    §

    impl Clone for QuicServerConfig

    §

    fn clone(&self) -> QuicServerConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl ServerConfig for QuicServerConfig

    Source

    pub fn set_alpn_protocols(&mut self, alpn_protocols: Vec<Vec<u8>>)

    Updates the set of ALPN protocols configured in the server config.

    +

    Trait Implementations§

    Source§

    impl Clone for QuicServerConfig

    Source§

    fn clone(&self) -> QuicServerConfig

    Returns a duplicate 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 ServerConfig for QuicServerConfig

    Source§

    fn start_session( &self, version: u32, - params: &TransportParameters, -) -> Box<dyn Session>

    Start a server session with this configuration Read more
    §

    fn initial_keys( + params: &TransportParameters, +) -> Box<dyn Session>

    Start a server session with this configuration Read more
    Source§

    fn initial_keys( &self, version: u32, dst_cid: ConnectionId, -) -> Result<Keys, UnsupportedVersion>

    Create the initial set of keys given the client’s initial destination ConnectionId
    §

    fn retry_tag( +) -> Result<Keys, UnsupportedVersion>

    Create the initial set of keys given the client’s initial destination ConnectionId
    Source§

    fn retry_tag( &self, version: u32, orig_dst_cid: ConnectionId, packet: &[u8], -) -> [u8; 16]

    Generate the integrity tag for a retry packet Read more
    §

    impl TryFrom<Arc<ServerConfig>> for QuicServerConfig

    §

    type Error = NoInitialCipherSuite

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

    fn try_from( +) -> [u8; 16]

    Generate the integrity tag for a retry packet Read more
    Source§

    impl TryFrom<Arc<ServerConfig>> for QuicServerConfig

    Source§

    type Error = NoInitialCipherSuite

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

    fn try_from( inner: Arc<ServerConfig>, -) -> Result<QuicServerConfig, <QuicServerConfig as TryFrom<Arc<ServerConfig>>>::Error>

    Performs the conversion.
    §

    impl TryFrom<ServerConfig> for QuicServerConfig

    §

    type Error = NoInitialCipherSuite

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

    fn try_from( +) -> Result<QuicServerConfig, <QuicServerConfig as TryFrom<Arc<ServerConfig>>>::Error>

    Performs the conversion.
    Source§

    impl TryFrom<ServerConfig> for QuicServerConfig

    Source§

    type Error = NoInitialCipherSuite

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

    fn try_from( inner: ServerConfig, ) -> Result<QuicServerConfig, <QuicServerConfig as TryFrom<ServerConfig>>::Error>

    Performs the conversion.

    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 diff --git a/pr/531/docs/noq/crypto/rustls/struct.TlsSession.html b/pr/531/docs/noq/crypto/rustls/struct.TlsSession.html index 87d935004..29977f219 100644 --- a/pr/531/docs/noq/crypto/rustls/struct.TlsSession.html +++ b/pr/531/docs/noq/crypto/rustls/struct.TlsSession.html @@ -1,11 +1,11 @@ -TlsSession in noq::crypto::rustls - Rust

    TlsSession

    Struct TlsSession 

    pub struct TlsSession { /* private fields */ }
    Expand description

    A rustls TLS session

    -

    Trait Implementations§

    §

    impl Session for TlsSession

    §

    fn peer_identity(&self) -> Option<Box<dyn Any>>

    For the rustls TlsSession, the Any type is Vec<rustls::pki_types::CertificateDer>

    -
    §

    fn initial_keys(&self, dst_cid: ConnectionId, side: Side) -> Keys

    Create the initial set of keys given the client’s initial destination ConnectionId
    §

    fn handshake_data(&self) -> Option<Box<dyn Any>>

    Get data negotiated during the handshake, if available Read more
    §

    fn early_crypto(&self) -> Option<(Box<dyn HeaderKey>, Box<dyn PacketKey>)>

    Get the 0-RTT keys if available (clients only) Read more
    §

    fn early_data_accepted(&self) -> Option<bool>

    If the 0-RTT-encrypted data has been accepted by the peer
    §

    fn is_handshaking(&self) -> bool

    Returns true until the connection is fully established.
    §

    fn read_handshake(&mut self, buf: &[u8]) -> Result<bool, Error>

    Read bytes of handshake data Read more
    §

    fn transport_parameters(&self) -> Result<Option<TransportParameters>, Error>

    The peer’s QUIC transport parameters Read more
    §

    fn write_handshake(&mut self, buf: &mut Vec<u8>) -> Option<Keys>

    Writes handshake bytes into the given buffer and optionally returns the negotiated keys Read more
    §

    fn next_1rtt_keys(&mut self) -> Option<KeyPair<Box<dyn PacketKey>>>

    Compute keys for the next key update
    §

    fn is_valid_retry( +TlsSession in noq::crypto::rustls - Rust

    TlsSession

    Struct TlsSession 

    Source
    pub struct TlsSession { /* private fields */ }
    Expand description

    A rustls TLS session

    +

    Trait Implementations§

    Source§

    impl Session for TlsSession

    Source§

    fn peer_identity(&self) -> Option<Box<dyn Any>>

    For the rustls TlsSession, the Any type is Vec<rustls::pki_types::CertificateDer>

    +
    Source§

    fn initial_keys(&self, dst_cid: ConnectionId, side: Side) -> Keys

    Create the initial set of keys given the client’s initial destination ConnectionId
    Source§

    fn handshake_data(&self) -> Option<Box<dyn Any>>

    Get data negotiated during the handshake, if available Read more
    Source§

    fn early_crypto(&self) -> Option<(Box<dyn HeaderKey>, Box<dyn PacketKey>)>

    Get the 0-RTT keys if available (clients only) Read more
    Source§

    fn early_data_accepted(&self) -> Option<bool>

    If the 0-RTT-encrypted data has been accepted by the peer
    Source§

    fn is_handshaking(&self) -> bool

    Returns true until the connection is fully established.
    Source§

    fn read_handshake(&mut self, buf: &[u8]) -> Result<bool, Error>

    Read bytes of handshake data Read more
    Source§

    fn transport_parameters(&self) -> Result<Option<TransportParameters>, Error>

    The peer’s QUIC transport parameters Read more
    Source§

    fn write_handshake(&mut self, buf: &mut Vec<u8>) -> Option<Keys>

    Writes handshake bytes into the given buffer and optionally returns the negotiated keys Read more
    Source§

    fn next_1rtt_keys(&mut self) -> Option<KeyPair<Box<dyn PacketKey>>>

    Compute keys for the next key update
    Source§

    fn is_valid_retry( &self, orig_dst_cid: ConnectionId, header: &[u8], payload: &[u8], -) -> bool

    Verify the integrity of a retry packet Read more
    §

    fn export_keying_material( +) -> bool

    Verify the integrity of a retry packet Read more
    Source§

    fn export_keying_material( &self, output: &mut [u8], label: &[u8], diff --git a/pr/531/docs/noq/crypto/struct.CryptoError.html b/pr/531/docs/noq/crypto/struct.CryptoError.html index 241b8f10b..9972e9f65 100644 --- a/pr/531/docs/noq/crypto/struct.CryptoError.html +++ b/pr/531/docs/noq/crypto/struct.CryptoError.html @@ -1,5 +1,5 @@ -CryptoError in noq::crypto - Rust

    CryptoError

    Struct CryptoError 

    pub struct CryptoError;
    Expand description

    Generic crypto errors

    -

    Trait Implementations§

    §

    impl Debug for CryptoError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<Unspecified> for CryptoError

    §

    fn from(_: Unspecified) -> CryptoError

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +CryptoError in noq::crypto - Rust

    CryptoError

    Struct CryptoError 

    Source
    pub struct CryptoError;
    Expand description

    Generic crypto errors

    +

    Trait Implementations§

    Source§

    impl Debug for CryptoError

    Source§

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

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

    impl From<Unspecified> for CryptoError

    Source§

    fn from(_: Unspecified) -> CryptoError

    Converts to this type from the input type.

    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> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/pr/531/docs/noq/crypto/struct.ExportKeyingMaterialError.html b/pr/531/docs/noq/crypto/struct.ExportKeyingMaterialError.html index 0b2b60f7a..0c542ab5e 100644 --- a/pr/531/docs/noq/crypto/struct.ExportKeyingMaterialError.html +++ b/pr/531/docs/noq/crypto/struct.ExportKeyingMaterialError.html @@ -1,7 +1,7 @@ -ExportKeyingMaterialError in noq::crypto - Rust

    ExportKeyingMaterialError

    Struct ExportKeyingMaterialError 

    pub struct ExportKeyingMaterialError;
    Expand description

    Error returned by Session::export_keying_material.

    +ExportKeyingMaterialError in noq::crypto - Rust

    ExportKeyingMaterialError

    Struct ExportKeyingMaterialError 

    Source
    pub struct ExportKeyingMaterialError;
    Expand description

    Error returned by Session::export_keying_material.

    This error occurs if the requested output length is too large.

    -

    Trait Implementations§

    §

    impl Debug for ExportKeyingMaterialError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for ExportKeyingMaterialError

    §

    fn eq(&self, other: &ExportKeyingMaterialError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for ExportKeyingMaterialError

    §

    impl StructuralPartialEq for ExportKeyingMaterialError

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for ExportKeyingMaterialError

    Source§

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

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

    impl PartialEq for ExportKeyingMaterialError

    Source§

    fn eq(&self, other: &ExportKeyingMaterialError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ExportKeyingMaterialError

    Source§

    impl StructuralPartialEq for ExportKeyingMaterialError

    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
    §

    impl<Q, K> Equivalent<K> for Q
    where diff --git a/pr/531/docs/noq/crypto/struct.KeyPair.html b/pr/531/docs/noq/crypto/struct.KeyPair.html index 0efcf9b35..b04e27a1d 100644 --- a/pr/531/docs/noq/crypto/struct.KeyPair.html +++ b/pr/531/docs/noq/crypto/struct.KeyPair.html @@ -1,4 +1,4 @@ -KeyPair in noq::crypto - Rust

    KeyPair

    Struct KeyPair 

    pub struct KeyPair<T> {
    +KeyPair in noq::crypto - Rust

    KeyPair

    Struct KeyPair 

    Source
    pub struct KeyPair<T> {
         pub local: T,
         pub remote: T,
     }
    Expand description

    A pair of keys for bidirectional communication

    diff --git a/pr/531/docs/noq/crypto/struct.Keys.html b/pr/531/docs/noq/crypto/struct.Keys.html index 1b0cf0bb5..9a2f6ee75 100644 --- a/pr/531/docs/noq/crypto/struct.Keys.html +++ b/pr/531/docs/noq/crypto/struct.Keys.html @@ -1,4 +1,4 @@ -Keys in noq::crypto - Rust

    Keys

    Struct Keys 

    pub struct Keys {
    +Keys in noq::crypto - Rust

    Keys

    Struct Keys 

    Source
    pub struct Keys {
         pub header: KeyPair<Box<dyn HeaderKey>>,
         pub packet: KeyPair<Box<dyn PacketKey>>,
     }
    Expand description

    A complete set of keys for a certain packet space

    diff --git a/pr/531/docs/noq/crypto/struct.UnsupportedVersion.html b/pr/531/docs/noq/crypto/struct.UnsupportedVersion.html index c27892c94..f77ec3a68 100644 --- a/pr/531/docs/noq/crypto/struct.UnsupportedVersion.html +++ b/pr/531/docs/noq/crypto/struct.UnsupportedVersion.html @@ -1,5 +1,5 @@ -UnsupportedVersion in noq::crypto - Rust

    UnsupportedVersion

    Struct UnsupportedVersion 

    pub struct UnsupportedVersion;
    Expand description

    Error indicating that the specified QUIC version is not supported

    -

    Trait Implementations§

    §

    impl Debug for UnsupportedVersion

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<UnsupportedVersion> for ConnectError

    §

    fn from(_: UnsupportedVersion) -> ConnectError

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +UnsupportedVersion in noq::crypto - Rust

    UnsupportedVersion

    Struct UnsupportedVersion 

    Source
    pub struct UnsupportedVersion;
    Expand description

    Error indicating that the specified QUIC version is not supported

    +

    Trait Implementations§

    Source§

    impl Debug for UnsupportedVersion

    Source§

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

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

    impl From<UnsupportedVersion> for ConnectError

    Source§

    fn from(_: UnsupportedVersion) -> ConnectError

    Converts to this type from the input type.

    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> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/pr/531/docs/noq/crypto/trait.ClientConfig.html b/pr/531/docs/noq/crypto/trait.ClientConfig.html index c1050f10b..613ecf973 100644 --- a/pr/531/docs/noq/crypto/trait.ClientConfig.html +++ b/pr/531/docs/noq/crypto/trait.ClientConfig.html @@ -1,16 +1,16 @@ -ClientConfig in noq::crypto - Rust

    ClientConfig

    Trait ClientConfig 

    pub trait ClientConfig: Send + Sync {
    +ClientConfig in noq::crypto - Rust

    ClientConfig

    Trait ClientConfig 

    Source
    pub trait ClientConfig: Send + Sync {
         // Required method
         fn start_session(
             &self,
             version: u32,
             server_name: &str,
    -        params: &TransportParameters,
    +        params: &TransportParameters,
         ) -> Result<Box<dyn Session>, ConnectError>;
     }
    Expand description

    Client-side configuration for the crypto protocol

    -

    Required Methods§

    Required Methods§

    Source

    fn start_session( &self, version: u32, server_name: &str, - params: &TransportParameters, + params: &TransportParameters, ) -> Result<Box<dyn Session>, ConnectError>

    Start a client session with this configuration

    -

    Implementors§

    \ No newline at end of file +

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/crypto/trait.HandshakeTokenKey.html b/pr/531/docs/noq/crypto/trait.HandshakeTokenKey.html index 907ba4dd6..d1afef56b 100644 --- a/pr/531/docs/noq/crypto/trait.HandshakeTokenKey.html +++ b/pr/531/docs/noq/crypto/trait.HandshakeTokenKey.html @@ -1,4 +1,4 @@ -HandshakeTokenKey in noq::crypto - Rust

    HandshakeTokenKey

    Trait HandshakeTokenKey 

    pub trait HandshakeTokenKey: Send + Sync {
    +HandshakeTokenKey in noq::crypto - Rust

    HandshakeTokenKey

    Trait HandshakeTokenKey 

    Source
    pub trait HandshakeTokenKey: Send + Sync {
         // Required methods
         fn seal(
             &self,
    @@ -11,10 +11,10 @@
             data: &'a mut [u8],
         ) -> Result<&'a [u8], CryptoError>;
     }
    Expand description

    The trait for encrypting tokens that power retry packets and NEW_TOKEN frames.

    -

    Required Methods§

    fn seal(&self, token_nonce: u128, data: &mut Vec<u8>) -> Result<(), CryptoError>

    Method for sealing a token in-place.

    +

    Required Methods§

    Source

    fn seal(&self, token_nonce: u128, data: &mut Vec<u8>) -> Result<(), CryptoError>

    Method for sealing a token in-place.

    The nonce doesn’t need to be attached to the ciphertext, but the authentication tag is expected to be appended to data.

    -

    fn open<'a>( +

    Source

    fn open<'a>( &self, token_nonce: u128, data: &'a mut [u8], diff --git a/pr/531/docs/noq/crypto/trait.HeaderKey.html b/pr/531/docs/noq/crypto/trait.HeaderKey.html index 0d1435da9..bd43de09f 100644 --- a/pr/531/docs/noq/crypto/trait.HeaderKey.html +++ b/pr/531/docs/noq/crypto/trait.HeaderKey.html @@ -1,10 +1,10 @@ -HeaderKey in noq::crypto - Rust

    HeaderKey

    Trait HeaderKey 

    pub trait HeaderKey: Send + Sync {
    +HeaderKey in noq::crypto - Rust

    HeaderKey

    Trait HeaderKey 

    Source
    pub trait HeaderKey: Send + Sync {
         // Required methods
         fn decrypt(&self, pn_offset: usize, packet: &mut [u8]);
         fn encrypt(&self, pn_offset: usize, packet: &mut [u8]);
         fn sample_size(&self) -> usize;
     }
    Expand description

    Keys used to protect packet headers

    -

    Required Methods§

    fn decrypt(&self, pn_offset: usize, packet: &mut [u8])

    Decrypt the given packet’s header

    -

    fn encrypt(&self, pn_offset: usize, packet: &mut [u8])

    Encrypt the given packet’s header

    -

    fn sample_size(&self) -> usize

    The sample size used for this key’s algorithm

    -

    Implementations on Foreign Types§

    §

    impl HeaderKey for Box<dyn HeaderProtectionKey>

    §

    fn decrypt(&self, pn_offset: usize, packet: &mut [u8])

    §

    fn encrypt(&self, pn_offset: usize, packet: &mut [u8])

    §

    fn sample_size(&self) -> usize

    Implementors§

    \ No newline at end of file +

    Required Methods§

    Source

    fn decrypt(&self, pn_offset: usize, packet: &mut [u8])

    Decrypt the given packet’s header

    +
    Source

    fn encrypt(&self, pn_offset: usize, packet: &mut [u8])

    Encrypt the given packet’s header

    +
    Source

    fn sample_size(&self) -> usize

    The sample size used for this key’s algorithm

    +

    Implementations on Foreign Types§

    Source§

    impl HeaderKey for Box<dyn HeaderProtectionKey>

    Source§

    fn decrypt(&self, pn_offset: usize, packet: &mut [u8])

    Source§

    fn encrypt(&self, pn_offset: usize, packet: &mut [u8])

    Source§

    fn sample_size(&self) -> usize

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/crypto/trait.HmacKey.html b/pr/531/docs/noq/crypto/trait.HmacKey.html index 4b5f2d4bb..9b9937114 100644 --- a/pr/531/docs/noq/crypto/trait.HmacKey.html +++ b/pr/531/docs/noq/crypto/trait.HmacKey.html @@ -1,10 +1,10 @@ -HmacKey in noq::crypto - Rust

    HmacKey

    Trait HmacKey 

    pub trait HmacKey: Send + Sync {
    +HmacKey in noq::crypto - Rust

    HmacKey

    Trait HmacKey 

    Source
    pub trait HmacKey: Send + Sync {
         // Required methods
         fn sign(&self, data: &[u8], signature_out: &mut [u8]);
         fn signature_len(&self) -> usize;
         fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>;
     }
    Expand description

    A key for signing with HMAC-based algorithms

    -

    Required Methods§

    fn sign(&self, data: &[u8], signature_out: &mut [u8])

    Method for signing a message

    -

    fn signature_len(&self) -> usize

    Length of sign’s output

    -

    fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>

    Method for verifying a message

    -

    Implementations on Foreign Types§

    §

    impl HmacKey for Key

    §

    fn sign(&self, data: &[u8], out: &mut [u8])

    §

    fn signature_len(&self) -> usize

    §

    fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>

    Implementors§

    \ No newline at end of file +

    Required Methods§

    Source

    fn sign(&self, data: &[u8], signature_out: &mut [u8])

    Method for signing a message

    +
    Source

    fn signature_len(&self) -> usize

    Length of sign’s output

    +
    Source

    fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>

    Method for verifying a message

    +

    Implementations on Foreign Types§

    Source§

    impl HmacKey for Key

    Source§

    fn sign(&self, data: &[u8], out: &mut [u8])

    Source§

    fn signature_len(&self) -> usize

    Source§

    fn verify(&self, data: &[u8], signature: &[u8]) -> Result<(), CryptoError>

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/crypto/trait.PacketKey.html b/pr/531/docs/noq/crypto/trait.PacketKey.html index cafc8eb1e..c670d4f6b 100644 --- a/pr/531/docs/noq/crypto/trait.PacketKey.html +++ b/pr/531/docs/noq/crypto/trait.PacketKey.html @@ -1,4 +1,4 @@ -PacketKey in noq::crypto - Rust

    PacketKey

    Trait PacketKey 

    pub trait PacketKey: Send + Sync {
    +PacketKey in noq::crypto - Rust

    PacketKey

    Trait PacketKey 

    Source
    pub trait PacketKey: Send + Sync {
         // Required methods
         fn encrypt(
             &self,
    @@ -18,34 +18,34 @@
         fn confidentiality_limit(&self) -> u64;
         fn integrity_limit(&self) -> u64;
     }
    Expand description

    Keys used to protect packet payloads

    -

    Required Methods§

    fn encrypt( +

    Required Methods§

    Source

    fn encrypt( &self, path_id: PathId, packet: u64, buf: &mut [u8], header_len: usize, )

    Encrypt the packet payload with the given packet number

    -

    fn decrypt( +

    Source

    fn decrypt( &self, path_id: PathId, packet: u64, header: &[u8], payload: &mut BytesMut, ) -> Result<(), CryptoError>

    Decrypt the packet payload with the given packet number

    -

    fn tag_len(&self) -> usize

    The length of the AEAD tag appended to packets on encryption

    -

    fn confidentiality_limit(&self) -> u64

    Maximum number of packets that may be sent using a single key

    -

    fn integrity_limit(&self) -> u64

    Maximum number of incoming packets that may fail decryption before the connection must be +

    Source

    fn tag_len(&self) -> usize

    The length of the AEAD tag appended to packets on encryption

    +
    Source

    fn confidentiality_limit(&self) -> u64

    Maximum number of packets that may be sent using a single key

    +
    Source

    fn integrity_limit(&self) -> u64

    Maximum number of incoming packets that may fail decryption before the connection must be abandoned

    -

    Implementations on Foreign Types§

    §

    impl PacketKey for Box<dyn PacketKey>

    §

    fn encrypt( +

    Implementations on Foreign Types§

    Source§

    impl PacketKey for Box<dyn PacketKey>

    Source§

    fn encrypt( &self, path_id: PathId, packet: u64, buf: &mut [u8], header_len: usize, -)

    §

    fn decrypt( +)

    Source§

    fn decrypt( &self, path_id: PathId, packet: u64, header: &[u8], payload: &mut BytesMut, -) -> Result<(), CryptoError>

    §

    fn tag_len(&self) -> usize

    §

    fn confidentiality_limit(&self) -> u64

    §

    fn integrity_limit(&self) -> u64

    Implementors§

    \ No newline at end of file +) -> Result<(), CryptoError>

    Source§

    fn tag_len(&self) -> usize

    Source§

    fn confidentiality_limit(&self) -> u64

    Source§

    fn integrity_limit(&self) -> u64

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/crypto/trait.ServerConfig.html b/pr/531/docs/noq/crypto/trait.ServerConfig.html index 21cc0eaf4..1bab34898 100644 --- a/pr/531/docs/noq/crypto/trait.ServerConfig.html +++ b/pr/531/docs/noq/crypto/trait.ServerConfig.html @@ -1,4 +1,4 @@ -ServerConfig in noq::crypto - Rust

    ServerConfig

    Trait ServerConfig 

    pub trait ServerConfig: Send + Sync {
    +ServerConfig in noq::crypto - Rust

    ServerConfig

    Trait ServerConfig 

    Source
    pub trait ServerConfig: Send + Sync {
         // Required methods
         fn initial_keys(
             &self,
    @@ -14,15 +14,15 @@
         fn start_session(
             &self,
             version: u32,
    -        params: &TransportParameters,
    +        params: &TransportParameters,
         ) -> Box<dyn Session>;
     }
    Expand description

    Server-side configuration for the crypto protocol

    -

    Required Methods§

    Required Methods§

    Source

    fn initial_keys( &self, version: u32, dst_cid: ConnectionId, ) -> Result<Keys, UnsupportedVersion>

    Create the initial set of keys given the client’s initial destination ConnectionId

    -

    fn retry_tag( +

    Source

    fn retry_tag( &self, version: u32, orig_dst_cid: ConnectionId, @@ -30,10 +30,10 @@ ) -> [u8; 16]

    Generate the integrity tag for a retry packet

    Never called if initial_keys rejected version.

    See the specification: https://www.rfc-editor.org/rfc/rfc9001#name-retry-packet-integrity

    -

    fn start_session( +

    Source

    fn start_session( &self, version: u32, - params: &TransportParameters, + params: &TransportParameters, ) -> Box<dyn Session>

    Start a server session with this configuration

    Never called if initial_keys rejected version.

    -

    Implementors§

    \ No newline at end of file +

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/crypto/trait.Session.html b/pr/531/docs/noq/crypto/trait.Session.html index a384ae3a3..b85c826d9 100644 --- a/pr/531/docs/noq/crypto/trait.Session.html +++ b/pr/531/docs/noq/crypto/trait.Session.html @@ -1,4 +1,4 @@ -Session in noq::crypto - Rust

    Session

    Trait Session 

    pub trait Session:
    +Session in noq::crypto - Rust

    Session

    Trait Session 

    Source
    pub trait Session:
         Send
         + Sync
         + 'static {
    @@ -9,8 +9,8 @@
         fn early_crypto(&self) -> Option<(Box<dyn HeaderKey>, Box<dyn PacketKey>)>;
         fn early_data_accepted(&self) -> Option<bool>;
         fn is_handshaking(&self) -> bool;
    -    fn read_handshake(&mut self, buf: &[u8]) -> Result<bool, Error>;
    -    fn transport_parameters(&self) -> Result<Option<TransportParameters>, Error>;
    +    fn read_handshake(&mut self, buf: &[u8]) -> Result<bool, Error>;
    +    fn transport_parameters(&self) -> Result<Option<TransportParameters>, Error>;
         fn write_handshake(&mut self, buf: &mut Vec<u8>) -> Option<Keys>;
         fn next_1rtt_keys(&mut self) -> Option<KeyPair<Box<dyn PacketKey>>>;
         fn is_valid_retry(
    @@ -26,37 +26,37 @@
             context: &[u8],
         ) -> Result<(), ExportKeyingMaterialError>;
     }
    Expand description

    A cryptographic session (commonly TLS)

    -

    Required Methods§

    fn initial_keys(&self, dst_cid: ConnectionId, side: Side) -> Keys

    Create the initial set of keys given the client’s initial destination ConnectionId

    -

    fn handshake_data(&self) -> Option<Box<dyn Any>>

    Get data negotiated during the handshake, if available

    +

    Required Methods§

    Source

    fn initial_keys(&self, dst_cid: ConnectionId, side: Side) -> Keys

    Create the initial set of keys given the client’s initial destination ConnectionId

    +
    Source

    fn handshake_data(&self) -> Option<Box<dyn Any>>

    Get data negotiated during the handshake, if available

    Returns None until the connection emits HandshakeDataReady.

    -

    fn peer_identity(&self) -> Option<Box<dyn Any>>

    Get the peer’s identity, if available

    -

    fn early_crypto(&self) -> Option<(Box<dyn HeaderKey>, Box<dyn PacketKey>)>

    Get the 0-RTT keys if available (clients only)

    +
    Source

    fn peer_identity(&self) -> Option<Box<dyn Any>>

    Get the peer’s identity, if available

    +
    Source

    fn early_crypto(&self) -> Option<(Box<dyn HeaderKey>, Box<dyn PacketKey>)>

    Get the 0-RTT keys if available (clients only)

    On the client side, this method can be used to see if 0-RTT key material is available to start sending data before the protocol handshake has completed.

    Returns None if the key material is not available. This might happen if you have not connected to this server before.

    -

    fn early_data_accepted(&self) -> Option<bool>

    If the 0-RTT-encrypted data has been accepted by the peer

    -

    fn is_handshaking(&self) -> bool

    Returns true until the connection is fully established.

    -

    fn read_handshake(&mut self, buf: &[u8]) -> Result<bool, Error>

    Read bytes of handshake data

    +
    Source

    fn early_data_accepted(&self) -> Option<bool>

    If the 0-RTT-encrypted data has been accepted by the peer

    +
    Source

    fn is_handshaking(&self) -> bool

    Returns true until the connection is fully established.

    +
    Source

    fn read_handshake(&mut self, buf: &[u8]) -> Result<bool, Error>

    Read bytes of handshake data

    This should be called with the contents of CRYPTO frames. If it returns Ok, the caller should call write_handshake() to check if the crypto protocol has anything to send to the peer. This method will only return true the first time that handshake data is available. Future calls will always return false.

    On success, returns true iff self.handshake_data() has been populated.

    -

    fn transport_parameters(&self) -> Result<Option<TransportParameters>, Error>

    The peer’s QUIC transport parameters

    +
    Source

    fn transport_parameters(&self) -> Result<Option<TransportParameters>, Error>

    The peer’s QUIC transport parameters

    These are only available after the first flight from the peer has been received.

    -

    fn write_handshake(&mut self, buf: &mut Vec<u8>) -> Option<Keys>

    Writes handshake bytes into the given buffer and optionally returns the negotiated keys

    +
    Source

    fn write_handshake(&mut self, buf: &mut Vec<u8>) -> Option<Keys>

    Writes handshake bytes into the given buffer and optionally returns the negotiated keys

    When the handshake proceeds to the next phase, this method will return a new set of keys to encrypt data with.

    -

    fn next_1rtt_keys(&mut self) -> Option<KeyPair<Box<dyn PacketKey>>>

    Compute keys for the next key update

    -

    fn is_valid_retry( +

    Source

    fn next_1rtt_keys(&mut self) -> Option<KeyPair<Box<dyn PacketKey>>>

    Compute keys for the next key update

    +
    Source

    fn is_valid_retry( &self, orig_dst_cid: ConnectionId, header: &[u8], payload: &[u8], ) -> bool

    Verify the integrity of a retry packet

    See the specification: https://www.rfc-editor.org/rfc/rfc9001#name-retry-packet-integrity

    -

    fn export_keying_material( +

    Source

    fn export_keying_material( &self, output: &mut [u8], label: &[u8], @@ -66,4 +66,4 @@ from the Session separation.

    This function will fail, returning ExportKeyingMaterialError, if the requested output length is too large.

    -

    Implementors§

    \ No newline at end of file +

    Implementors§

    Source§

    impl Session for TlsSession

    \ No newline at end of file diff --git a/pr/531/docs/noq/enum.ConfigError.html b/pr/531/docs/noq/enum.ConfigError.html index 4dee45ac1..d9577900f 100644 --- a/pr/531/docs/noq/enum.ConfigError.html +++ b/pr/531/docs/noq/enum.ConfigError.html @@ -1,9 +1,9 @@ -ConfigError in noq - Rust

    ConfigError

    Enum ConfigError 

    #[non_exhaustive]
    pub enum ConfigError { +ConfigError in noq - Rust

    ConfigError

    Enum ConfigError 

    Source
    #[non_exhaustive]
    pub enum ConfigError { OutOfBounds, }
    Expand description

    Errors in the configuration of an endpoint

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    OutOfBounds

    Value exceeds supported bounds

    -

    Trait Implementations§

    §

    impl Clone for ConfigError

    §

    fn clone(&self) -> ConfigError

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConfigError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ConfigError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for ConfigError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    §

    impl From<TryFromIntError> for ConfigError

    §

    fn from(_: TryFromIntError) -> ConfigError

    Converts to this type from the input type.
    §

    impl From<VarIntBoundsExceeded> for ConfigError

    §

    fn from(_: VarIntBoundsExceeded) -> ConfigError

    Converts to this type from the input type.
    §

    impl PartialEq for ConfigError

    §

    fn eq(&self, other: &ConfigError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for ConfigError

    §

    impl StructuralPartialEq for ConfigError

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ConfigError

    Source§

    fn clone(&self) -> ConfigError

    Returns a duplicate 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 ConfigError

    Source§

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

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

    impl Display for ConfigError

    Source§

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

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

    impl Error for ConfigError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<TryFromIntError> for ConfigError

    Source§

    fn from(_: TryFromIntError) -> ConfigError

    Converts to this type from the input type.
    Source§

    impl From<VarIntBoundsExceeded> for ConfigError

    Source§

    fn from(_: VarIntBoundsExceeded) -> ConfigError

    Converts to this type from the input type.
    Source§

    impl PartialEq for ConfigError

    Source§

    fn eq(&self, other: &ConfigError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ConfigError

    Source§

    impl StructuralPartialEq for ConfigError

    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 diff --git a/pr/531/docs/noq/enum.ConnectError.html b/pr/531/docs/noq/enum.ConnectError.html index ea4c8b75f..1bef64fbb 100644 --- a/pr/531/docs/noq/enum.ConnectError.html +++ b/pr/531/docs/noq/enum.ConnectError.html @@ -1,4 +1,4 @@ -ConnectError in noq - Rust

    ConnectError

    Enum ConnectError 

    pub enum ConnectError {
    +ConnectError in noq - Rust

    ConnectError

    Enum ConnectError 

    Source
    pub enum ConnectError {
         EndpointStopping,
         CidsExhausted,
         InvalidServerName(String),
    @@ -17,8 +17,8 @@
     
    §

    NoDefaultClientConfig

    No default client configuration was set up

    Use Endpoint::connect_with to specify a client configuration.

    §

    UnsupportedVersion

    The local endpoint does not support the QUIC version specified in the client configuration

    -

    Trait Implementations§

    §

    impl Clone for ConnectError

    §

    fn clone(&self) -> ConnectError

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConnectError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ConnectError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for ConnectError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    §

    impl From<UnsupportedVersion> for ConnectError

    §

    fn from(_: UnsupportedVersion) -> ConnectError

    Converts to this type from the input type.
    §

    impl PartialEq for ConnectError

    §

    fn eq(&self, other: &ConnectError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for ConnectError

    §

    impl StructuralPartialEq for ConnectError

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ConnectError

    Source§

    fn clone(&self) -> ConnectError

    Returns a duplicate 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 ConnectError

    Source§

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

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

    impl Display for ConnectError

    Source§

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

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

    impl Error for ConnectError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<UnsupportedVersion> for ConnectError

    Source§

    fn from(_: UnsupportedVersion) -> ConnectError

    Converts to this type from the input type.
    Source§

    impl PartialEq for ConnectError

    Source§

    fn eq(&self, other: &ConnectError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ConnectError

    Source§

    impl StructuralPartialEq for ConnectError

    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 diff --git a/pr/531/docs/noq/enum.ConnectionError.html b/pr/531/docs/noq/enum.ConnectionError.html index 7ab9b6dc9..b67738705 100644 --- a/pr/531/docs/noq/enum.ConnectionError.html +++ b/pr/531/docs/noq/enum.ConnectionError.html @@ -1,6 +1,6 @@ -ConnectionError in noq - Rust

    ConnectionError

    Enum ConnectionError 

    pub enum ConnectionError {
    +ConnectionError in noq - Rust

    ConnectionError

    Enum ConnectionError 

    Source
    pub enum ConnectionError {
         VersionMismatch,
    -    TransportError(Error),
    +    TransportError(Error),
         ConnectionClosed(ConnectionClose),
         ApplicationClosed(ApplicationClose),
         Reset,
    @@ -9,7 +9,7 @@
         CidsExhausted,
     }
    Expand description

    Reasons why a connection might be lost

    Variants§

    §

    VersionMismatch

    The peer doesn’t implement any supported version

    -
    §

    TransportError(Error)

    The peer violated the QUIC specification as understood by this implementation

    +
    §

    TransportError(Error)

    The peer violated the QUIC specification as understood by this implementation

    §

    ConnectionClosed(ConnectionClose)

    The peer’s QUIC stack aborted the connection automatically

    §

    ApplicationClosed(ApplicationClose)

    The peer closed the connection

    §

    Reset

    The peer is unable to continue processing this connection, usually due to having restarted

    @@ -20,8 +20,8 @@ and §

    LocallyClosed

    The local application closed the connection

    §

    CidsExhausted

    The connection could not be created because not enough of the CID space is available

    Try using longer connection IDs.

    -

    Trait Implementations§

    §

    impl Clone for ConnectionError

    §

    fn clone(&self) -> ConnectionError

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConnectionError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ConnectionError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for ConnectionError

    §

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    §

    impl From<Close> for ConnectionError

    §

    fn from(x: Close) -> ConnectionError

    Converts to this type from the input type.
    §

    impl From<CloseReason> for ConnectionError

    §

    fn from(value: CloseReason) -> ConnectionError

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for ReadError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for ResetError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for SendDatagramError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for StoppedError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for WriteError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    §

    impl From<Error> for ConnectionError

    §

    fn from(source: Error) -> ConnectionError

    Converts to this type from the input type.
    §

    impl PartialEq for ConnectionError

    §

    fn eq(&self, other: &ConnectionError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for ConnectionError

    §

    impl StructuralPartialEq for ConnectionError

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ConnectionError

    Source§

    fn clone(&self) -> ConnectionError

    Returns a duplicate 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 ConnectionError

    Source§

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

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

    impl Display for ConnectionError

    Source§

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

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

    impl Error for ConnectionError

    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<Close> for ConnectionError

    Source§

    fn from(x: Close) -> ConnectionError

    Converts to this type from the input type.
    Source§

    impl From<CloseReason> for ConnectionError

    Source§

    fn from(value: CloseReason) -> ConnectionError

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for ReadError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for ResetError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for SendDatagramError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for StoppedError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for WriteError

    Source§

    fn from(source: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectionError

    Source§

    fn from(source: Error) -> ConnectionError

    Converts to this type from the input type.
    Source§

    impl PartialEq for ConnectionError

    Source§

    fn eq(&self, other: &ConnectionError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ConnectionError

    Source§

    impl StructuralPartialEq for ConnectionError

    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 diff --git a/pr/531/docs/noq/enum.Dir.html b/pr/531/docs/noq/enum.Dir.html index accca563d..d7de578ea 100644 --- a/pr/531/docs/noq/enum.Dir.html +++ b/pr/531/docs/noq/enum.Dir.html @@ -1,25 +1,25 @@ -Dir in noq - Rust

    Dir

    Enum Dir 

    pub enum Dir {
    +Dir in noq - Rust

    Dir

    Enum Dir 

    Source
    pub enum Dir {
         Bi = 0,
         Uni = 1,
     }
    Expand description

    Whether a stream communicates data in both directions or only from the initiator

    Variants§

    §

    Bi = 0

    Data flows in both directions

    §

    Uni = 1

    Data flows only from the stream’s initiator

    -

    Trait Implementations§

    §

    impl<'arbitrary> Arbitrary<'arbitrary> for Dir

    §

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Dir, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    §

    fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Dir, Error>

    Generate an arbitrary value of Self from the entirety of the given -unstructured data. Read more
    §

    fn size_hint(depth: usize) -> (usize, Option<usize>)

    Get a size hint for how many bytes out of an Unstructured this type +

    Trait Implementations§

    Source§

    impl<'arbitrary> Arbitrary<'arbitrary> for Dir

    Source§

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Dir, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    Source§

    fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Dir, Error>

    Generate an arbitrary value of Self from the entirety of the given +unstructured data. Read more
    Source§

    fn size_hint(depth: usize) -> (usize, Option<usize>)

    Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
    §

    fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

    Get a size hint for how many bytes out of an Unstructured this type -needs to construct itself. Read more
    §

    impl Clone for Dir

    §

    fn clone(&self) -> Dir

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for Dir

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for Dir

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Hash for Dir

    §

    fn hash<__H>(&self, state: &mut __H)
    where +needs to construct itself. Read more

    Source§

    impl Clone for Dir

    Source§

    fn clone(&self) -> Dir

    Returns a duplicate 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 Dir

    Source§

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

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

    impl Display for Dir

    Source§

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

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

    impl Hash for Dir

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for Dir

    §

    fn cmp(&self, other: &Dir) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for Dir

    Source§

    fn cmp(&self, other: &Dir) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for Dir

    §

    fn eq(&self, other: &Dir) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl PartialOrd for Dir

    §

    fn partial_cmp(&self, other: &Dir) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the + Self: Sized,

    Restrict a value to a certain interval. Read more

    Source§

    impl PartialEq for Dir

    Source§

    fn eq(&self, other: &Dir) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl PartialOrd for Dir

    Source§

    fn partial_cmp(&self, other: &Dir) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the <= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    §

    impl Copy for Dir

    §

    impl Eq for Dir

    §

    impl StructuralPartialEq for Dir

    Auto Trait Implementations§

    §

    impl Freeze for Dir

    §

    impl RefUnwindSafe for Dir

    §

    impl Send for Dir

    §

    impl Sync for Dir

    §

    impl Unpin for Dir

    §

    impl UnwindSafe for Dir

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +the >= operator. Read more

    Source§

    impl Copy for Dir

    Source§

    impl Eq for Dir

    Source§

    impl StructuralPartialEq for Dir

    Auto Trait Implementations§

    §

    impl Freeze for Dir

    §

    impl RefUnwindSafe for Dir

    §

    impl Send for Dir

    §

    impl Sync for Dir

    §

    impl Unpin for Dir

    §

    impl UnwindSafe for Dir

    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 diff --git a/pr/531/docs/noq/enum.EcnCodepoint.html b/pr/531/docs/noq/enum.EcnCodepoint.html index 80d1346f4..78ed5f186 100644 --- a/pr/531/docs/noq/enum.EcnCodepoint.html +++ b/pr/531/docs/noq/enum.EcnCodepoint.html @@ -1,4 +1,4 @@ -EcnCodepoint in noq - Rust

    EcnCodepoint

    Enum EcnCodepoint 

    #[repr(u8)]
    pub enum EcnCodepoint { +EcnCodepoint in noq - Rust

    EcnCodepoint

    Enum EcnCodepoint 

    Source
    #[repr(u8)]
    pub enum EcnCodepoint { Ect0 = 2, Ect1 = 1, Ce = 3, @@ -6,10 +6,10 @@

    Variants§

    §

    Ect0 = 2

    The ECT(0) codepoint, indicating that an endpoint is ECN-capable

    §

    Ect1 = 1

    The ECT(1) codepoint, indicating that an endpoint is ECN-capable

    §

    Ce = 3

    The CE codepoint, signalling that congestion was experienced

    -

    Implementations§

    §

    impl EcnCodepoint

    pub fn from_bits(x: u8) -> Option<EcnCodepoint>

    Create new object from the given bits

    -

    pub fn is_ce(self) -> bool

    Returns whether the codepoint is a CE, signalling that congestion was experienced

    -

    Trait Implementations§

    §

    impl Clone for EcnCodepoint

    §

    fn clone(&self) -> EcnCodepoint

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for EcnCodepoint

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for EcnCodepoint

    §

    fn eq(&self, other: &EcnCodepoint) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Copy for EcnCodepoint

    §

    impl Eq for EcnCodepoint

    §

    impl StructuralPartialEq for EcnCodepoint

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Implementations§

    Source§

    impl EcnCodepoint

    Source

    pub fn from_bits(x: u8) -> Option<EcnCodepoint>

    Create new object from the given bits

    +
    Source

    pub fn is_ce(self) -> bool

    Returns whether the codepoint is a CE, signalling that congestion was experienced

    +

    Trait Implementations§

    Source§

    impl Clone for EcnCodepoint

    Source§

    fn clone(&self) -> EcnCodepoint

    Returns a duplicate 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 EcnCodepoint

    Source§

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

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

    impl PartialEq for EcnCodepoint

    Source§

    fn eq(&self, other: &EcnCodepoint) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Copy for EcnCodepoint

    Source§

    impl Eq for EcnCodepoint

    Source§

    impl StructuralPartialEq for EcnCodepoint

    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 diff --git a/pr/531/docs/noq/enum.FrameType.html b/pr/531/docs/noq/enum.FrameType.html index 8b88c1f95..0b1b223f9 100644 --- a/pr/531/docs/noq/enum.FrameType.html +++ b/pr/531/docs/noq/enum.FrameType.html @@ -1,4 +1,4 @@ -FrameType in noq - Rust

    FrameType

    Enum FrameType 

    pub enum FrameType {
    +FrameType in noq - Rust

    FrameType

    Enum FrameType 

    Source
    pub enum FrameType {
     
    Show 44 variants Padding, Ping, Ack, @@ -7,7 +7,7 @@ StopSending, Crypto, NewToken, - Stream(StreamInfo), + Stream(StreamInfo), MaxData, MaxStreamData, MaxStreamsBidi, @@ -25,7 +25,7 @@ HandshakeDone, AckFrequency, ImmediateAck, - Datagram(DatagramInfo), + Datagram(DatagramInfo), ObservedIpv4Addr, ObservedIpv6Addr, PathAck, @@ -43,10 +43,10 @@ ReachOutAtIpv4, ReachOutAtIpv6, RemoveAddress, -
    }

    Variants§

    §

    Padding

    §

    Ping

    §

    Ack

    §

    AckEcn

    §

    ResetStream

    §

    StopSending

    §

    Crypto

    §

    NewToken

    §

    Stream(StreamInfo)

    §

    MaxData

    §

    MaxStreamData

    §

    MaxStreamsBidi

    §

    MaxStreamsUni

    §

    DataBlocked

    §

    StreamDataBlocked

    §

    StreamsBlockedBidi

    §

    StreamsBlockedUni

    §

    NewConnectionId

    §

    RetireConnectionId

    §

    PathChallenge

    §

    PathResponse

    §

    ConnectionClose

    §

    ApplicationClose

    §

    HandshakeDone

    §

    AckFrequency

    §

    ImmediateAck

    §

    Datagram(DatagramInfo)

    §

    ObservedIpv4Addr

    §

    ObservedIpv6Addr

    §

    PathAck

    §

    PathAckEcn

    §

    PathAbandon

    §

    PathStatusBackup

    §

    PathStatusAvailable

    §

    PathNewConnectionId

    §

    PathRetireConnectionId

    §

    MaxPathId

    §

    PathsBlocked

    §

    PathCidsBlocked

    §

    AddIpv4Address

    §

    AddIpv6Address

    §

    ReachOutAtIpv4

    §

    ReachOutAtIpv6

    §

    RemoveAddress

    Trait Implementations§

    §

    impl Clone for FrameType

    §

    fn clone(&self) -> FrameType

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for FrameType

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Decodable for FrameType

    §

    fn decode<B>(buf: &mut B) -> Result<FrameType, UnexpectedEnd>
    where - B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    impl Display for FrameType

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Encodable for FrameType

    §

    fn encode<B>(&self, buf: &mut B)
    where - B: BufMut,

    Append the encoding of self to the provided buffer.
    §

    impl PartialEq for FrameType

    §

    fn eq(&self, other: &FrameType) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl TryFrom<u64> for FrameType

    §

    type Error = InvalidFrameId

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

    fn try_from(value: u64) -> Result<FrameType, <FrameType as TryFrom<u64>>::Error>

    Performs the conversion.
    §

    impl Copy for FrameType

    §

    impl Eq for FrameType

    §

    impl StructuralPartialEq for FrameType

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    }

    Variants§

    §

    Padding

    §

    Ping

    §

    Ack

    §

    AckEcn

    §

    ResetStream

    §

    StopSending

    §

    Crypto

    §

    NewToken

    §

    Stream(StreamInfo)

    §

    MaxData

    §

    MaxStreamData

    §

    MaxStreamsBidi

    §

    MaxStreamsUni

    §

    DataBlocked

    §

    StreamDataBlocked

    §

    StreamsBlockedBidi

    §

    StreamsBlockedUni

    §

    NewConnectionId

    §

    RetireConnectionId

    §

    PathChallenge

    §

    PathResponse

    §

    ConnectionClose

    §

    ApplicationClose

    §

    HandshakeDone

    §

    AckFrequency

    §

    ImmediateAck

    §

    Datagram(DatagramInfo)

    §

    ObservedIpv4Addr

    §

    ObservedIpv6Addr

    §

    PathAck

    §

    PathAckEcn

    §

    PathAbandon

    §

    PathStatusBackup

    §

    PathStatusAvailable

    §

    PathNewConnectionId

    §

    PathRetireConnectionId

    §

    MaxPathId

    §

    PathsBlocked

    §

    PathCidsBlocked

    §

    AddIpv4Address

    §

    AddIpv6Address

    §

    ReachOutAtIpv4

    §

    ReachOutAtIpv6

    §

    RemoveAddress

    Trait Implementations§

    Source§

    impl Clone for FrameType

    Source§

    fn clone(&self) -> FrameType

    Returns a duplicate 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 FrameType

    Source§

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

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

    impl Decodable for FrameType

    Source§

    fn decode<B>(buf: &mut B) -> Result<FrameType, UnexpectedEnd>
    where + B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    Source§

    impl Display for FrameType

    Source§

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

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

    impl Encodable for FrameType

    Source§

    fn encode<B>(&self, buf: &mut B)
    where + B: BufMut,

    Append the encoding of self to the provided buffer.
    Source§

    impl PartialEq for FrameType

    Source§

    fn eq(&self, other: &FrameType) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl TryFrom<u64> for FrameType

    Source§

    type Error = InvalidFrameId

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

    fn try_from(value: u64) -> Result<FrameType, <FrameType as TryFrom<u64>>::Error>

    Performs the conversion.
    Source§

    impl Copy for FrameType

    Source§

    impl Eq for FrameType

    Source§

    impl StructuralPartialEq for FrameType

    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 diff --git a/pr/531/docs/noq/enum.Side.html b/pr/531/docs/noq/enum.Side.html index 48f91ae13..b8e235db9 100644 --- a/pr/531/docs/noq/enum.Side.html +++ b/pr/531/docs/noq/enum.Side.html @@ -1,27 +1,27 @@ -Side in noq - Rust

    Side

    Enum Side 

    pub enum Side {
    +Side in noq - Rust

    Side

    Enum Side 

    Source
    pub enum Side {
         Client = 0,
         Server = 1,
     }
    Expand description

    Whether an endpoint was the initiator of a connection

    Variants§

    §

    Client = 0

    The initiator of a connection

    §

    Server = 1

    The acceptor of a connection

    -

    Implementations§

    §

    impl Side

    pub fn is_client(self) -> bool

    Shorthand for self == Side::Client

    -

    pub fn is_server(self) -> bool

    Shorthand for self == Side::Server

    -

    Trait Implementations§

    §

    impl<'arbitrary> Arbitrary<'arbitrary> for Side

    §

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Side, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    §

    fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Side, Error>

    Generate an arbitrary value of Self from the entirety of the given -unstructured data. Read more
    §

    fn size_hint(depth: usize) -> (usize, Option<usize>)

    Get a size hint for how many bytes out of an Unstructured this type +

    Implementations§

    Source§

    impl Side

    Source

    pub fn is_client(self) -> bool

    Shorthand for self == Side::Client

    +
    Source

    pub fn is_server(self) -> bool

    Shorthand for self == Side::Server

    +

    Trait Implementations§

    Source§

    impl<'arbitrary> Arbitrary<'arbitrary> for Side

    Source§

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Side, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    Source§

    fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Side, Error>

    Generate an arbitrary value of Self from the entirety of the given +unstructured data. Read more
    Source§

    fn size_hint(depth: usize) -> (usize, Option<usize>)

    Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
    §

    fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

    Get a size hint for how many bytes out of an Unstructured this type -needs to construct itself. Read more
    §

    impl Clone for Side

    §

    fn clone(&self) -> Side

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for Side

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Hash for Side

    §

    fn hash<__H>(&self, state: &mut __H)
    where +needs to construct itself. Read more

    Source§

    impl Clone for Side

    Source§

    fn clone(&self) -> Side

    Returns a duplicate 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 Side

    Source§

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

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

    impl Hash for Side

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Not for Side

    §

    type Output = Side

    The resulting type after applying the ! operator.
    §

    fn not(self) -> Side

    Performs the unary ! operation. Read more
    §

    impl Ord for Side

    §

    fn cmp(&self, other: &Side) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Not for Side

    Source§

    type Output = Side

    The resulting type after applying the ! operator.
    Source§

    fn not(self) -> Side

    Performs the unary ! operation. Read more
    Source§

    impl Ord for Side

    Source§

    fn cmp(&self, other: &Side) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for Side

    §

    fn eq(&self, other: &Side) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl PartialOrd for Side

    §

    fn partial_cmp(&self, other: &Side) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the + Self: Sized,

    Restrict a value to a certain interval. Read more

    Source§

    impl PartialEq for Side

    Source§

    fn eq(&self, other: &Side) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl PartialOrd for Side

    Source§

    fn partial_cmp(&self, other: &Side) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the <= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    §

    impl Copy for Side

    §

    impl Eq for Side

    §

    impl StructuralPartialEq for Side

    Auto Trait Implementations§

    §

    impl Freeze for Side

    §

    impl RefUnwindSafe for Side

    §

    impl Send for Side

    §

    impl Sync for Side

    §

    impl Unpin for Side

    §

    impl UnwindSafe for Side

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +the >= operator. Read more

    Source§

    impl Copy for Side

    Source§

    impl Eq for Side

    Source§

    impl StructuralPartialEq for Side

    Auto Trait Implementations§

    §

    impl Freeze for Side

    §

    impl RefUnwindSafe for Side

    §

    impl Send for Side

    §

    impl Sync for Side

    §

    impl Unpin for Side

    §

    impl UnwindSafe for Side

    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 diff --git a/pr/531/docs/noq/struct.AckFrequencyConfig.html b/pr/531/docs/noq/struct.AckFrequencyConfig.html index 0713c9549..846cbe3af 100644 --- a/pr/531/docs/noq/struct.AckFrequencyConfig.html +++ b/pr/531/docs/noq/struct.AckFrequencyConfig.html @@ -1,4 +1,4 @@ -AckFrequencyConfig in noq - Rust

    AckFrequencyConfig

    Struct AckFrequencyConfig 

    pub struct AckFrequencyConfig { /* private fields */ }
    Expand description

    Parameters for controlling the peer’s acknowledgement frequency

    +AckFrequencyConfig in noq - Rust

    AckFrequencyConfig

    Struct AckFrequencyConfig 

    Source
    pub struct AckFrequencyConfig { /* private fields */ }
    Expand description

    Parameters for controlling the peer’s acknowledgement frequency

    The parameters provided in this config will be sent to the peer at the beginning of the connection, so it can take them into account when sending acknowledgements (see each parameter’s description for details on how it influences acknowledgement frequency).

    @@ -7,7 +7,7 @@ description for details on how it influences acknowledgement frequency).

    The defaults produce behavior slightly different than the behavior without this extension, because they change the way reordered packets are handled (see AckFrequencyConfig::reordering_threshold for details).

    -

    Implementations§

    §

    impl AckFrequencyConfig

    Implementations§

    Source§

    impl AckFrequencyConfig

    Source

    pub fn ack_eliciting_threshold( &mut self, value: VarInt, ) -> &mut AckFrequencyConfig

    The ack-eliciting threshold we will request the peer to use

    @@ -17,7 +17,7 @@ without immediately sending an ACK.

    ack-eliciting packets have been received. A value of 0 results in a receiver immediately acknowledging every ack-eliciting packet.

    Defaults to 1, which sends ACK frames for every other ack-eliciting packet.

    -

    pub fn max_ack_delay( +

    Source

    pub fn max_ack_delay( &mut self, value: Option<Duration>, ) -> &mut AckFrequencyConfig

    The max_ack_delay we will request the peer to use

    @@ -27,7 +27,7 @@ an ACK when the ack-eliciting threshold hasn’t been reached.

    transport parameter, and at most the greater of the current path RTT or 25ms.

    Defaults to None, in which case the peer’s original max_ack_delay will be used, as obtained from its transport parameters.

    -

    pub fn reordering_threshold(&mut self, value: VarInt) -> &mut AckFrequencyConfig

    The reordering threshold we will request the peer to use

    +
    Source

    pub fn reordering_threshold(&mut self, value: VarInt) -> &mut AckFrequencyConfig

    The reordering threshold we will request the peer to use

    This threshold represents the amount of out-of-order packets that will trigger an endpoint to send an ACK, without waiting for ack_eliciting_threshold to be exceeded or for max_ack_delay to be elapsed.

    @@ -37,7 +37,7 @@ behavior when the extension is disabled).

    It is recommended to set this value to TransportConfig::packet_threshold minus one. Since the default value for TransportConfig::packet_threshold is 3, this value defaults to 2.

    -

    Trait Implementations§

    §

    impl Clone for AckFrequencyConfig

    §

    fn clone(&self) -> AckFrequencyConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for AckFrequencyConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for AckFrequencyConfig

    §

    fn default() -> AckFrequencyConfig

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for AckFrequencyConfig

    Source§

    fn clone(&self) -> AckFrequencyConfig

    Returns a duplicate 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 AckFrequencyConfig

    Source§

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

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

    impl Default for AckFrequencyConfig

    Source§

    fn default() -> AckFrequencyConfig

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

    Auto Trait Implementations§

    §

    impl Freeze for AckFrequencyConfig

    §

    impl RefUnwindSafe for AckFrequencyConfig

    §

    impl Send for AckFrequencyConfig

    §

    impl Sync for AckFrequencyConfig

    §

    impl Unpin for AckFrequencyConfig

    §

    impl UnwindSafe for AckFrequencyConfig

    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 diff --git a/pr/531/docs/noq/struct.ApplicationClose.html b/pr/531/docs/noq/struct.ApplicationClose.html index f0e90fca1..f221a3f42 100644 --- a/pr/531/docs/noq/struct.ApplicationClose.html +++ b/pr/531/docs/noq/struct.ApplicationClose.html @@ -1,11 +1,11 @@ -ApplicationClose in noq - Rust

    ApplicationClose

    Struct ApplicationClose 

    pub struct ApplicationClose {
    +ApplicationClose in noq - Rust

    ApplicationClose

    Struct ApplicationClose 

    Source
    pub struct ApplicationClose {
         pub error_code: VarInt,
         pub reason: Bytes,
     }
    Expand description

    Reason given by an application for closing the connection

    Fields§

    §error_code: VarInt

    Application-specific reason code

    §reason: Bytes

    Human-readable reason for the close

    -

    Trait Implementations§

    §

    impl Clone for ApplicationClose

    §

    fn clone(&self) -> ApplicationClose

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ApplicationClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ApplicationClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for ApplicationClose

    §

    fn eq(&self, other: &ApplicationClose) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for ApplicationClose

    §

    impl StructuralPartialEq for ApplicationClose

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ApplicationClose

    Source§

    fn clone(&self) -> ApplicationClose

    Returns a duplicate 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 ApplicationClose

    Source§

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

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

    impl Display for ApplicationClose

    Source§

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

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

    impl PartialEq for ApplicationClose

    Source§

    fn eq(&self, other: &ApplicationClose) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ApplicationClose

    Source§

    impl StructuralPartialEq for ApplicationClose

    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 diff --git a/pr/531/docs/noq/struct.BloomTokenLog.html b/pr/531/docs/noq/struct.BloomTokenLog.html index fe04f6a68..b71a39ab7 100644 --- a/pr/531/docs/noq/struct.BloomTokenLog.html +++ b/pr/531/docs/noq/struct.BloomTokenLog.html @@ -1,4 +1,4 @@ -BloomTokenLog in noq - Rust

    BloomTokenLog

    Struct BloomTokenLog 

    pub struct BloomTokenLog(/* private fields */);
    Expand description

    Bloom filter-based TokenLog

    +BloomTokenLog in noq - Rust

    BloomTokenLog

    Struct BloomTokenLog 

    Source
    pub struct BloomTokenLog(/* private fields */);
    Expand description

    Bloom filter-based TokenLog

    Parameterizable over an approximate maximum number of bytes to allocate. Starts out by storing used tokens in a hash set. Once the hash set becomes too large, converts it to a bloom filter. This achieves a memory profile of linear growth with an upper bound.

    @@ -6,17 +6,17 @@ This achieves a memory profile of linear growth with an upper bound.

    each of the two periods currently non-expired tokens could expire in. As such, turns over filters as time goes on to avoid bloom filter false positive rate increasing infinitely over time.

    -

    Implementations§

    §

    impl BloomTokenLog

    pub fn new_expected_items(max_bytes: usize, expected_hits: u64) -> BloomTokenLog

    Construct with an approximate maximum memory usage and expected number of validation token +

    Implementations§

    Source§

    impl BloomTokenLog

    Source

    pub fn new_expected_items(max_bytes: usize, expected_hits: u64) -> BloomTokenLog

    Construct with an approximate maximum memory usage and expected number of validation token usages per expiration period

    Calculates the optimal bloom filter k number automatically.

    -

    pub fn new(max_bytes: usize, k_num: u32) -> BloomTokenLog

    Construct with an approximate maximum memory usage and a bloom filter k number

    +
    Source

    pub fn new(max_bytes: usize, k_num: u32) -> BloomTokenLog

    Construct with an approximate maximum memory usage and a bloom filter k number

    If choosing a custom k number, note that BloomTokenLog always maintains two filters between them and divides the allocation budget of max_bytes evenly between them. As such, each bloom filter will contain max_bytes * 4 bits.

    -

    Trait Implementations§

    §

    impl Default for BloomTokenLog

    Default to 20 MiB max memory consumption and expected one million hits

    +

    Trait Implementations§

    Source§

    impl Default for BloomTokenLog

    Default to 20 MiB max memory consumption and expected one million hits

    With the default validation token lifetime of 2 weeks, this corresponds to one token usage per 1.21 seconds.

    -
    §

    fn default() -> BloomTokenLog

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

    impl TokenLog for BloomTokenLog

    Source§

    fn default() -> BloomTokenLog

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

    impl TokenLog for BloomTokenLog

    Source§

    fn check_and_insert( &self, nonce: u128, issued: SystemTime, diff --git a/pr/531/docs/noq/struct.Chunk.html b/pr/531/docs/noq/struct.Chunk.html index 7fa5d18ec..84aae8417 100644 --- a/pr/531/docs/noq/struct.Chunk.html +++ b/pr/531/docs/noq/struct.Chunk.html @@ -1,11 +1,11 @@ -Chunk in noq - Rust

    Chunk

    Struct Chunk 

    pub struct Chunk {
    +Chunk in noq - Rust

    Chunk

    Struct Chunk 

    Source
    pub struct Chunk {
         pub offset: u64,
         pub bytes: Bytes,
     }
    Expand description

    A chunk of data from the receive stream

    Fields§

    §offset: u64

    The offset in the stream

    §bytes: Bytes

    The contents of the chunk

    -

    Trait Implementations§

    §

    impl Debug for Chunk

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for Chunk

    §

    fn eq(&self, other: &Chunk) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for Chunk

    §

    impl StructuralPartialEq for Chunk

    Auto Trait Implementations§

    §

    impl !Freeze for Chunk

    §

    impl RefUnwindSafe for Chunk

    §

    impl Send for Chunk

    §

    impl Sync for Chunk

    §

    impl Unpin for Chunk

    §

    impl UnwindSafe for Chunk

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Chunk

    Source§

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

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

    impl PartialEq for Chunk

    Source§

    fn eq(&self, other: &Chunk) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for Chunk

    Source§

    impl StructuralPartialEq for Chunk

    Auto Trait Implementations§

    §

    impl !Freeze for Chunk

    §

    impl RefUnwindSafe for Chunk

    §

    impl Send for Chunk

    §

    impl Sync for Chunk

    §

    impl Unpin for Chunk

    §

    impl UnwindSafe for Chunk

    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
    §

    impl<Q, K> Equivalent<K> for Q
    where diff --git a/pr/531/docs/noq/struct.ClientConfig.html b/pr/531/docs/noq/struct.ClientConfig.html index 6f3881dee..7692a2bb1 100644 --- a/pr/531/docs/noq/struct.ClientConfig.html +++ b/pr/531/docs/noq/struct.ClientConfig.html @@ -1,7 +1,7 @@ -ClientConfig in noq - Rust

    ClientConfig

    Struct ClientConfig 

    #[non_exhaustive]
    pub struct ClientConfig { /* private fields */ }
    Expand description

    Configuration for outgoing connections

    +ClientConfig in noq - Rust

    ClientConfig

    Struct ClientConfig 

    Source
    #[non_exhaustive]
    pub struct ClientConfig { /* private fields */ }
    Expand description

    Configuration for outgoing connections

    Default values should be suitable for most internet applications.

    -

    Implementations§

    §

    impl ClientConfig

    pub fn new(crypto: Arc<dyn ClientConfig>) -> ClientConfig

    Create a default config with a particular cryptographic config

    -

    pub fn initial_dst_cid_provider( +

    Implementations§

    Source§

    impl ClientConfig

    Source

    pub fn new(crypto: Arc<dyn ClientConfig>) -> ClientConfig

    Create a default config with a particular cryptographic config

    +
    Source

    pub fn initial_dst_cid_provider( &mut self, initial_dst_cid_provider: Arc<dyn Fn() -> ConnectionId + Send + Sync>, ) -> &mut ClientConfig

    Configure how to populate the destination CID of the initial packet when attempting to @@ -10,18 +10,18 @@ establish a new connection

    a good reason, you do not need to change it.

    When prefer to override the default, please note that the generated connection ID MUST be at least 8 bytes long and unpredictable, as per section 7.2 of RFC 9000.

    -

    pub fn transport_config( +

    Source

    pub fn transport_config( &mut self, transport: Arc<TransportConfig>, ) -> &mut ClientConfig

    Set a custom TransportConfig

    -

    pub fn token_store(&mut self, store: Arc<dyn TokenStore>) -> &mut ClientConfig

    Set a custom TokenStore

    +
    Source

    pub fn token_store(&mut self, store: Arc<dyn TokenStore>) -> &mut ClientConfig

    Set a custom TokenStore

    Defaults to TokenMemoryCache, which is suitable for most internet applications.

    -

    pub fn version(&mut self, version: u32) -> &mut ClientConfig

    Set the QUIC version to use

    -
    §

    impl ClientConfig

    pub fn try_with_platform_verifier() -> Result<ClientConfig, Error>

    Create a client configuration that trusts the platform’s native roots

    -

    pub fn with_root_certificates( +

    Source

    pub fn version(&mut self, version: u32) -> &mut ClientConfig

    Set the QUIC version to use

    +

    Source§

    impl ClientConfig

    Source

    pub fn try_with_platform_verifier() -> Result<ClientConfig, Error>

    Create a client configuration that trusts the platform’s native roots

    +
    Source

    pub fn with_root_certificates( roots: Arc<RootCertStore>, ) -> Result<ClientConfig, VerifierBuilderError>

    Create a client configuration that trusts specified trust anchors

    -

    Trait Implementations§

    §

    impl Clone for ClientConfig

    §

    fn clone(&self) -> ClientConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ClientConfig

    §

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ClientConfig

    Source§

    fn clone(&self) -> ClientConfig

    Returns a duplicate 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 ClientConfig

    Source§

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

    Formats the value using the given formatter. 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 diff --git a/pr/531/docs/noq/struct.ClosedStream.html b/pr/531/docs/noq/struct.ClosedStream.html index ce125296f..8eb864ca2 100644 --- a/pr/531/docs/noq/struct.ClosedStream.html +++ b/pr/531/docs/noq/struct.ClosedStream.html @@ -1,6 +1,6 @@ -ClosedStream in noq - Rust

    ClosedStream

    Struct ClosedStream 

    pub struct ClosedStream { /* private fields */ }
    Expand description

    Error indicating that a stream has not been opened or has already been finished or reset

    -

    Trait Implementations§

    §

    impl Clone for ClosedStream

    §

    fn clone(&self) -> ClosedStream

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ClosedStream

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for ClosedStream

    §

    fn default() -> ClosedStream

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

    impl Display for ClosedStream

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for ClosedStream

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<ClosedStream> for WriteError

    Source§

    fn from(_: ClosedStream) -> Self

    Converts to this type from the input type.
    §

    impl PartialEq for ClosedStream

    §

    fn eq(&self, other: &ClosedStream) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for ClosedStream

    §

    impl StructuralPartialEq for ClosedStream

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +ClosedStream in noq - Rust

    ClosedStream

    Struct ClosedStream 

    Source
    pub struct ClosedStream { /* private fields */ }
    Expand description

    Error indicating that a stream has not been opened or has already been finished or reset

    +

    Trait Implementations§

    Source§

    impl Clone for ClosedStream

    Source§

    fn clone(&self) -> ClosedStream

    Returns a duplicate 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 ClosedStream

    Source§

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

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

    impl Default for ClosedStream

    Source§

    fn default() -> ClosedStream

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

    impl Display for ClosedStream

    Source§

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

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

    impl Error for ClosedStream

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<ClosedStream> for WriteError

    Source§

    fn from(_: ClosedStream) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for ClosedStream

    Source§

    fn eq(&self, other: &ClosedStream) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ClosedStream

    Source§

    impl StructuralPartialEq for ClosedStream

    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 diff --git a/pr/531/docs/noq/struct.Connection.html b/pr/531/docs/noq/struct.Connection.html index d0e3c1f15..a3539f186 100644 --- a/pr/531/docs/noq/struct.Connection.html +++ b/pr/531/docs/noq/struct.Connection.html @@ -27,27 +27,27 @@ waiting on the <

    Source

    pub fn open_path_ensure( &self, addr: SocketAddr, - initial_status: PathStatus, + initial_status: PathStatus, ) -> OpenPath

    Opens a new path if no path exists yet for the remote address.

    Otherwise behaves exactly as open_path.

    Source

    pub fn open_path( &self, addr: SocketAddr, - initial_status: PathStatus, + initial_status: PathStatus, ) -> OpenPath

    Opens an additional path if the multipath extension is negotiated.

    The returned future completes once the path is either fully opened and ready to carry application data, or if there was an error.

    Dropping the returned future does not cancel the opening of the path, the -[PathEvent::Opened] event will still be emitted from Self::path_events if the +PathEvent::Opened event will still be emitted from Self::path_events if the path opens. The PathId for the events can be extracted from OpenPath::path_id.

    Failure to open a path can either occur immediately, before polling the returned future, or at a later time. If the failure is immediate OpenPath::path_id will return None and the future will be ready immediately. If the failure happens -later, a [PathEvent] will be emitted.

    +later, a PathEvent will be emitted.

    Source

    pub fn path(&self, id: PathId) -> Option<Path>

    Returns the Path structure of an open path

    -
    Source

    pub fn path_events(&self) -> Receiver<PathEvent>

    A broadcast receiver of [PathEvent]s for all paths in this connection

    -
    Source

    pub fn nat_traversal_updates(&self) -> Receiver<Event>

    A broadcast receiver of [n0_nat_traversal::Event]s for updates about server addresses

    +
    Source

    pub fn path_events(&self) -> Receiver<PathEvent>

    A broadcast receiver of PathEvents for all paths in this connection

    +
    Source

    pub fn nat_traversal_updates(&self) -> Receiver<Event>

    A broadcast receiver of n0_nat_traversal::Events for updates about server addresses

    Source

    pub async fn closed(&self) -> ConnectionError

    Wait for the connection to be closed for any reason

    Despite the return type’s name, closed connections are often not an error condition at the application layer. Cases that might be routine include ConnectionError::LocallyClosed @@ -163,7 +163,7 @@ strong and pseudorandom, and are suitable for use as keying material.

    Source

    pub fn add_nat_traversal_address( &self, address: SocketAddr, -) -> Result<(), Error>

    Registers one address at which this endpoint might be reachable

    +) -> Result<(), Error>

    Registers one address at which this endpoint might be reachable

    When the NAT traversal extension is negotiated, servers send these addresses to clients in ADD_ADDRESS frames. This allows clients to obtain server address candidates to initiate NAT traversal attempts. Clients provide their own reachable addresses in REACH_OUT frames @@ -171,7 +171,7 @@ when

    Source

    pub fn remove_nat_traversal_address( &self, address: SocketAddr, -) -> Result<(), Error>

    Removes one or more addresses from the set of addresses at which this endpoint is reachable

    +) -> Result<(), Error>

    Removes one or more addresses from the set of addresses at which this endpoint is reachable

    When the NAT traversal extension is negotiated, servers send address removals to clients in REMOVE_ADDRESS frames. This allows clients to stop using outdated server address candidates that are no longer valid for NAT traversal.

    @@ -179,11 +179,11 @@ server address candidates that are no longer valid for NAT traversal.

    Addresses not present in the set will be silently ignored.

    Source

    pub fn get_local_nat_traversal_addresses( &self, -) -> Result<Vec<SocketAddr>, Error>

    Get the current local nat traversal addresses

    +) -> Result<Vec<SocketAddr>, Error>

    Get the current local nat traversal addresses

    Source

    pub fn get_remote_nat_traversal_addresses( &self, -) -> Result<Vec<SocketAddr>, Error>

    Get the currently advertised nat traversal addresses by the server

    -
    Source

    pub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>

    Initiates a new nat traversal round

    +) -> Result<Vec<SocketAddr>, Error>

    Get the currently advertised nat traversal addresses by the server

    +
    Source

    pub fn initiate_nat_traversal_round(&self) -> Result<Vec<SocketAddr>, Error>

    Initiates a new nat traversal round

    A nat traversal round involves advertising the client’s local addresses in REACH_OUT frames, and initiating probing of the known remote addresses. When a new round is initiated, the previous one is cancelled, and paths that have not been opened are closed.

    @@ -212,4 +212,4 @@ otherwise. 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<T> WithSubscriber for T

    §

    fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
    where S: Into<Dispatch>,

    Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
    §

    fn with_current_subscriber(self) -> WithDispatch<Self>

    Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
    \ No newline at end of file +[WithDispatch] wrapper. Read more \ No newline at end of file diff --git a/pr/531/docs/noq/struct.ConnectionClose.html b/pr/531/docs/noq/struct.ConnectionClose.html index a1f3a469e..d66b8be4b 100644 --- a/pr/531/docs/noq/struct.ConnectionClose.html +++ b/pr/531/docs/noq/struct.ConnectionClose.html @@ -1,13 +1,13 @@ -ConnectionClose in noq - Rust

    ConnectionClose

    Struct ConnectionClose 

    pub struct ConnectionClose {
    +ConnectionClose in noq - Rust

    ConnectionClose

    Struct ConnectionClose 

    Source
    pub struct ConnectionClose {
         pub error_code: Code,
    -    pub frame_type: MaybeFrame,
    +    pub frame_type: MaybeFrame,
         pub reason: Bytes,
     }
    Expand description

    Reason given by the transport for closing the connection

    Fields§

    §error_code: Code

    Class of error as encoded in the specification

    -
    §frame_type: MaybeFrame

    Type of frame that caused the close

    +
    §frame_type: MaybeFrame

    Type of frame that caused the close

    §reason: Bytes

    Human-readable reason for the close

    -

    Trait Implementations§

    §

    impl Clone for ConnectionClose

    §

    fn clone(&self) -> ConnectionClose

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConnectionClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ConnectionClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<Error> for ConnectionClose

    §

    fn from(x: Error) -> ConnectionClose

    Converts to this type from the input type.
    §

    impl PartialEq for ConnectionClose

    §

    fn eq(&self, other: &ConnectionClose) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Eq for ConnectionClose

    §

    impl StructuralPartialEq for ConnectionClose

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ConnectionClose

    Source§

    fn clone(&self) -> ConnectionClose

    Returns a duplicate 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 ConnectionClose

    Source§

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

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

    impl Display for ConnectionClose

    Source§

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

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

    impl From<Error> for ConnectionClose

    Source§

    fn from(x: Error) -> ConnectionClose

    Converts to this type from the input type.
    Source§

    impl PartialEq for ConnectionClose

    Source§

    fn eq(&self, other: &ConnectionClose) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ConnectionClose

    Source§

    impl StructuralPartialEq for ConnectionClose

    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 diff --git a/pr/531/docs/noq/struct.ConnectionId.html b/pr/531/docs/noq/struct.ConnectionId.html index dab688b98..2c1548a9b 100644 --- a/pr/531/docs/noq/struct.ConnectionId.html +++ b/pr/531/docs/noq/struct.ConnectionId.html @@ -1,7 +1,7 @@ -ConnectionId in noq - Rust

    ConnectionId

    Struct ConnectionId 

    pub struct ConnectionId { /* private fields */ }
    Expand description

    Protocol-level identifier for a connection.

    +ConnectionId in noq - Rust

    ConnectionId

    Struct ConnectionId 

    Source
    pub struct ConnectionId { /* private fields */ }
    Expand description

    Protocol-level identifier for a connection.

    Mainly useful for identifying this connection’s packets on the wire with tools like Wireshark.

    -

    Implementations§

    §

    impl ConnectionId

    pub fn new(bytes: &[u8]) -> ConnectionId

    Construct cid from byte array

    -

    pub fn from_buf(buf: &mut (impl Buf + ?Sized), len: usize) -> ConnectionId

    Constructs cid by reading len bytes from a Buf

    +

    Implementations§

    Source§

    impl ConnectionId

    Source

    pub fn new(bytes: &[u8]) -> ConnectionId

    Construct cid from byte array

    +
    Source

    pub fn from_buf(buf: &mut (impl Buf + ?Sized), len: usize) -> ConnectionId

    Constructs cid by reading len bytes from a Buf

    Callers need to assure that buf.remaining() >= len

    Methods from Deref<Target = [u8]>§

    1.23.0 · Source

    pub fn is_ascii(&self) -> bool

    Checks if all bytes in this slice are within the ASCII range.

    Source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this slice is_ascii, returns it as a slice of @@ -2422,17 +2422,17 @@ is mapped to its ASCII lower case equivalent.

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

    To lowercase the value in-place, use make_ascii_lowercase.

    -

    Trait Implementations§

    §

    impl Clone for ConnectionId

    §

    fn clone(&self) -> ConnectionId

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConnectionId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Deref for ConnectionId

    §

    type Target = [u8]

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &[u8]

    Dereferences the value.
    §

    impl DerefMut for ConnectionId

    §

    fn deref_mut(&mut self) -> &mut [u8]

    Mutably dereferences the value.
    §

    impl Display for ConnectionId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Hash for ConnectionId

    §

    fn hash<__H>(&self, state: &mut __H)
    where +

    Trait Implementations§

    Source§

    impl Clone for ConnectionId

    Source§

    fn clone(&self) -> ConnectionId

    Returns a duplicate 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 ConnectionId

    Source§

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

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

    impl Deref for ConnectionId

    Source§

    type Target = [u8]

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &[u8]

    Dereferences the value.
    Source§

    impl DerefMut for ConnectionId

    Source§

    fn deref_mut(&mut self) -> &mut [u8]

    Mutably dereferences the value.
    Source§

    impl Display for ConnectionId

    Source§

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

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

    impl Hash for ConnectionId

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for ConnectionId

    §

    fn cmp(&self, other: &ConnectionId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for ConnectionId

    Source§

    fn cmp(&self, other: &ConnectionId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for ConnectionId

    §

    fn eq(&self, other: &ConnectionId) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl PartialOrd for ConnectionId

    §

    fn partial_cmp(&self, other: &ConnectionId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for ConnectionId

    Source§

    fn eq(&self, other: &ConnectionId) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl PartialOrd for ConnectionId

    Source§

    fn partial_cmp(&self, other: &ConnectionId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the <= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    §

    impl Copy for ConnectionId

    §

    impl Eq for ConnectionId

    §

    impl StructuralPartialEq for ConnectionId

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +the >= operator. Read more

    Source§

    impl Copy for ConnectionId

    Source§

    impl Eq for ConnectionId

    Source§

    impl StructuralPartialEq for ConnectionId

    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 diff --git a/pr/531/docs/noq/struct.ConnectionStats.html b/pr/531/docs/noq/struct.ConnectionStats.html index 4b20a52e5..7999fce51 100644 --- a/pr/531/docs/noq/struct.ConnectionStats.html +++ b/pr/531/docs/noq/struct.ConnectionStats.html @@ -1,4 +1,4 @@ -ConnectionStats in noq - Rust

    ConnectionStats

    Struct ConnectionStats 

    #[non_exhaustive]
    pub struct ConnectionStats { +ConnectionStats in noq - Rust

    ConnectionStats

    Struct ConnectionStats 

    Source
    #[non_exhaustive]
    pub struct ConnectionStats { pub udp_tx: UdpStats, pub udp_rx: UdpStats, pub frame_tx: FrameStats, @@ -8,7 +8,7 @@
    §udp_rx: UdpStats

    Statistics about UDP datagrams received on a connection

    §frame_tx: FrameStats

    Statistics about frames transmitted on a connection

    §frame_rx: FrameStats

    Statistics about frames received on a connection

    -

    Trait Implementations§

    §

    impl Clone for ConnectionStats

    §

    fn clone(&self) -> ConnectionStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConnectionStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for ConnectionStats

    §

    fn default() -> ConnectionStats

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ConnectionStats

    Source§

    fn clone(&self) -> ConnectionStats

    Returns a duplicate 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 ConnectionStats

    Source§

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

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

    impl Default for ConnectionStats

    Source§

    fn default() -> ConnectionStats

    Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/struct.EndpointConfig.html b/pr/531/docs/noq/struct.EndpointConfig.html index 8e381df1c..119aa6e09 100644 --- a/pr/531/docs/noq/struct.EndpointConfig.html +++ b/pr/531/docs/noq/struct.EndpointConfig.html @@ -1,16 +1,16 @@ -EndpointConfig in noq - Rust

    EndpointConfig

    Struct EndpointConfig 

    pub struct EndpointConfig { /* private fields */ }
    Expand description

    Global configuration for the endpoint, affecting all connections

    +EndpointConfig in noq - Rust

    EndpointConfig

    Struct EndpointConfig 

    Source
    pub struct EndpointConfig { /* private fields */ }
    Expand description

    Global configuration for the endpoint, affecting all connections

    Default values should be suitable for most internet applications.

    -

    Implementations§

    §

    impl EndpointConfig

    pub fn new(reset_key: Arc<dyn HmacKey>) -> EndpointConfig

    Create a default config with a particular reset_key

    -

    pub fn cid_generator<F>(&mut self, factory: F) -> &mut EndpointConfig
    where +

    Implementations§

    Source§

    impl EndpointConfig

    Source

    pub fn new(reset_key: Arc<dyn HmacKey>) -> EndpointConfig

    Create a default config with a particular reset_key

    +
    Source

    pub fn cid_generator<F>(&mut self, factory: F) -> &mut EndpointConfig
    where F: Fn() -> Box<dyn ConnectionIdGenerator> + Send + Sync + 'static,

    Supply a custom connection ID generator factory

    Called once by each Endpoint constructed from this configuration to obtain the CID generator which will be used to generate the CIDs used for incoming packets on all connections involving that Endpoint. A custom CID generator allows applications to embed information in local connection IDs, e.g. to support stateless packet-level load balancers.

    -

    Defaults to [HashedConnectionIdGenerator].

    -

    pub fn reset_key(&mut self, key: Arc<dyn HmacKey>) -> &mut EndpointConfig

    Private key used to send authenticated connection resets to peers who were +

    Defaults to HashedConnectionIdGenerator.

    +
    Source

    pub fn reset_key(&mut self, key: Arc<dyn HmacKey>) -> &mut EndpointConfig

    Private key used to send authenticated connection resets to peers who were communicating with a previous instance of this endpoint.

    -

    pub fn max_udp_payload_size( +

    Source

    pub fn max_udp_payload_size( &mut self, value: u16, ) -> Result<&mut EndpointConfig, ConfigError>

    Maximum UDP payload size accepted from peers (excluding UDP and IP overhead).

    @@ -19,27 +19,27 @@ communicating with a previous instance of this endpoint.

    1500 byte Ethernet MTU. Deployments on links with larger MTUs (e.g. loopback or Ethernet with jumbo frames) can raise this to improve performance at the cost of a linear increase in datagram receive buffer size.

    -

    pub fn get_max_udp_payload_size(&self) -> u64

    Get the current value of max_udp_payload_size

    -

    pub fn supported_versions( +

    Source

    pub fn get_max_udp_payload_size(&self) -> u64

    Get the current value of max_udp_payload_size

    +
    Source

    pub fn supported_versions( &mut self, supported_versions: Vec<u32>, ) -> &mut EndpointConfig

    Override supported QUIC versions

    -

    pub fn grease_quic_bit(&mut self, value: bool) -> &mut EndpointConfig

    Whether to accept QUIC packets containing any value for the fixed bit

    +
    Source

    pub fn grease_quic_bit(&mut self, value: bool) -> &mut EndpointConfig

    Whether to accept QUIC packets containing any value for the fixed bit

    Enabled by default. Helps protect against protocol ossification and makes traffic less identifiable to observers. Disable if helping observers identify this traffic as QUIC is desired.

    -

    pub fn min_reset_interval(&mut self, value: Duration) -> &mut EndpointConfig

    Minimum interval between outgoing stateless reset packets

    +
    Source

    pub fn min_reset_interval(&mut self, value: Duration) -> &mut EndpointConfig

    Minimum interval between outgoing stateless reset packets

    Defaults to 20ms. Limits the impact of attacks which flood an endpoint with garbage packets, e.g. ISAKMP/IKE amplification. Larger values provide a stronger defense, but may delay detection of some error conditions by clients. Using a ConnectionIdGenerator with a low rate of false positives in validate reduces the risk incurred by a small minimum reset interval.

    -

    pub fn rng_seed(&mut self, seed: Option<[u8; 32]>) -> &mut EndpointConfig

    Optional seed to be used internally for random number generation

    +
    Source

    pub fn rng_seed(&mut self, seed: Option<[u8; 32]>) -> &mut EndpointConfig

    Optional seed to be used internally for random number generation

    By default, noq will initialize an endpoint’s rng using a platform entropy source. However, you can seed the rng yourself through this method (e.g. if you need to run noq deterministically or if you are using noq in an environment that doesn’t have a source of entropy available).

    -

    Trait Implementations§

    §

    impl Clone for EndpointConfig

    §

    fn clone(&self) -> EndpointConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for EndpointConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for EndpointConfig

    §

    fn default() -> EndpointConfig

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for EndpointConfig

    Source§

    fn clone(&self) -> EndpointConfig

    Returns a duplicate 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 EndpointConfig

    Source§

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

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

    impl Default for EndpointConfig

    Source§

    fn default() -> EndpointConfig

    Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/struct.FrameStats.html b/pr/531/docs/noq/struct.FrameStats.html index 45aef0ee2..76ffe16fd 100644 --- a/pr/531/docs/noq/struct.FrameStats.html +++ b/pr/531/docs/noq/struct.FrameStats.html @@ -1,4 +1,4 @@ -FrameStats in noq - Rust

    FrameStats

    Struct FrameStats 

    #[non_exhaustive]
    pub struct FrameStats {
    Show 37 fields +FrameStats in noq - Rust

    FrameStats

    Struct FrameStats 

    Source
    #[non_exhaustive]
    pub struct FrameStats {
    Show 37 fields pub acks: u64, pub path_acks: u64, pub ack_frequency: u64, @@ -37,7 +37,7 @@ pub reach_out: u64, pub remove_address: u64,
    }
    Expand description

    Number of frames transmitted or received of each frame type

    -

    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.
    §acks: u64§path_acks: u64§ack_frequency: u64§crypto: u64§connection_close: u64§data_blocked: u64§datagram: u64§handshake_done: u8§immediate_ack: u64§max_data: u64§max_stream_data: u64§max_streams_bidi: u64§max_streams_uni: u64§new_connection_id: u64§path_new_connection_id: u64§new_token: u64§path_challenge: u64§path_response: u64§ping: u64§reset_stream: u64§retire_connection_id: u64§path_retire_connection_id: u64§stream_data_blocked: u64§streams_blocked_bidi: u64§streams_blocked_uni: u64§stop_sending: u64§stream: u64§observed_addr: u64§path_abandon: u64§path_status_available: u64§path_status_backup: u64§max_path_id: u64§paths_blocked: u64§path_cids_blocked: u64§add_address: u64§reach_out: u64§remove_address: u64

    Trait Implementations§

    §

    impl Clone for FrameStats

    §

    fn clone(&self) -> FrameStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for FrameStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for FrameStats

    §

    fn default() -> FrameStats

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

    impl Copy for FrameStats

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    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.
    §acks: u64§path_acks: u64§ack_frequency: u64§crypto: u64§connection_close: u64§data_blocked: u64§datagram: u64§handshake_done: u8§immediate_ack: u64§max_data: u64§max_stream_data: u64§max_streams_bidi: u64§max_streams_uni: u64§new_connection_id: u64§path_new_connection_id: u64§new_token: u64§path_challenge: u64§path_response: u64§ping: u64§reset_stream: u64§retire_connection_id: u64§path_retire_connection_id: u64§stream_data_blocked: u64§streams_blocked_bidi: u64§streams_blocked_uni: u64§stop_sending: u64§stream: u64§observed_addr: u64§path_abandon: u64§path_status_available: u64§path_status_backup: u64§max_path_id: u64§paths_blocked: u64§path_cids_blocked: u64§add_address: u64§reach_out: u64§remove_address: u64

    Trait Implementations§

    Source§

    impl Clone for FrameStats

    Source§

    fn clone(&self) -> FrameStats

    Returns a duplicate 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 FrameStats

    Source§

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

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

    impl Default for FrameStats

    Source§

    fn default() -> FrameStats

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

    impl Copy for FrameStats

    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 diff --git a/pr/531/docs/noq/struct.IdleTimeout.html b/pr/531/docs/noq/struct.IdleTimeout.html index 02edaf5b2..879ea2d79 100644 --- a/pr/531/docs/noq/struct.IdleTimeout.html +++ b/pr/531/docs/noq/struct.IdleTimeout.html @@ -1,4 +1,4 @@ -IdleTimeout in noq - Rust

    IdleTimeout

    Struct IdleTimeout 

    pub struct IdleTimeout(/* private fields */);
    Expand description

    Maximum duration of inactivity to accept before timing out the connection

    +IdleTimeout in noq - Rust

    IdleTimeout

    Struct IdleTimeout 

    Source
    pub struct IdleTimeout(/* private fields */);
    Expand description

    Maximum duration of inactivity to accept before timing out the connection

    This wraps an underlying VarInt, representing the duration in milliseconds. Values can be constructed by converting directly from VarInt, or using TryFrom<Duration>.

    @@ -6,19 +6,19 @@ constructed by converting directly from VarInt, or using TryF let timeout = IdleTimeout::from(VarInt::from_u32(10_000)); // Try to convert a `Duration` into a `VarInt`-encoded timeout -let timeout = IdleTimeout::try_from(Duration::from_secs(10))?;

    Trait Implementations§

    §

    impl Clone for IdleTimeout

    §

    fn clone(&self) -> IdleTimeout

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for IdleTimeout

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for IdleTimeout

    §

    fn default() -> IdleTimeout

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

    impl From<VarInt> for IdleTimeout

    §

    fn from(inner: VarInt) -> IdleTimeout

    Converts to this type from the input type.
    §

    impl Hash for IdleTimeout

    §

    fn hash<__H>(&self, state: &mut __H)
    where +let timeout = IdleTimeout::try_from(Duration::from_secs(10))?;

    Trait Implementations§

    Source§

    impl Clone for IdleTimeout

    Source§

    fn clone(&self) -> IdleTimeout

    Returns a duplicate 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 IdleTimeout

    Source§

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

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

    impl Default for IdleTimeout

    Source§

    fn default() -> IdleTimeout

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

    impl From<VarInt> for IdleTimeout

    Source§

    fn from(inner: VarInt) -> IdleTimeout

    Converts to this type from the input type.
    Source§

    impl Hash for IdleTimeout

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for IdleTimeout

    §

    fn cmp(&self, other: &IdleTimeout) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for IdleTimeout

    Source§

    fn cmp(&self, other: &IdleTimeout) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for IdleTimeout

    §

    fn eq(&self, other: &IdleTimeout) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl PartialOrd for IdleTimeout

    §

    fn partial_cmp(&self, other: &IdleTimeout) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the + Self: Sized,
    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for IdleTimeout

    Source§

    fn eq(&self, other: &IdleTimeout) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl PartialOrd for IdleTimeout

    Source§

    fn partial_cmp(&self, other: &IdleTimeout) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the <= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    §

    impl TryFrom<Duration> for IdleTimeout

    §

    type Error = VarIntBoundsExceeded

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

    fn try_from( +the >= operator. Read more

    Source§

    impl TryFrom<Duration> for IdleTimeout

    Source§

    type Error = VarIntBoundsExceeded

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

    fn try_from( timeout: Duration, -) -> Result<IdleTimeout, <IdleTimeout as TryFrom<Duration>>::Error>

    Performs the conversion.
    §

    impl Copy for IdleTimeout

    §

    impl Eq for IdleTimeout

    §

    impl StructuralPartialEq for IdleTimeout

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T

    Performs the conversion.
    Source§

    impl Copy for IdleTimeout

    Source§

    impl Eq for IdleTimeout

    Source§

    impl StructuralPartialEq for IdleTimeout

    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 diff --git a/pr/531/docs/noq/struct.Incoming.html b/pr/531/docs/noq/struct.Incoming.html index 1b2646722..5886d3b86 100644 --- a/pr/531/docs/noq/struct.Incoming.html +++ b/pr/531/docs/noq/struct.Incoming.html @@ -20,7 +20,7 @@ The inverse is not guaranteed.

    If self.remote_address_validated() is false, self.may_retry() is guaranteed to be true. The inverse is not guaranteed.

    Source

    pub fn orig_dst_cid(&self) -> ConnectionId

    The original destination CID when initiating the connection

    -
    Source

    pub fn decrypt(&self) -> Option<DecryptedInitial>

    Decrypt the Initial packet payload

    +
    Source

    pub fn decrypt(&self) -> Option<DecryptedInitial>

    Decrypt the Initial packet payload

    This clones and decrypts the packet payload (~1200 bytes). Can be used to extract information from the TLS ClientHello without completing the handshake.

    Trait Implementations§

    Source§

    impl Debug for Incoming

    Source§

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

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

    impl Drop for Incoming

    Source§

    fn drop(&mut self)

    Executes the destructor for this type. Read more
    Source§

    impl IntoFuture for Incoming

    Source§

    type Output = Result<Connection, ConnectionError>

    The output that the future will produce on completion.
    Source§

    type IntoFuture = IncomingFuture

    Which kind of future are we turning this into?
    Source§

    fn into_future(self) -> Self::IntoFuture

    Creates a future from a value. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where diff --git a/pr/531/docs/noq/struct.InvalidCid.html b/pr/531/docs/noq/struct.InvalidCid.html index b24d97db4..2cc9c3850 100644 --- a/pr/531/docs/noq/struct.InvalidCid.html +++ b/pr/531/docs/noq/struct.InvalidCid.html @@ -1,5 +1,5 @@ -InvalidCid in noq - Rust

    InvalidCid

    Struct InvalidCid 

    pub struct InvalidCid;
    Expand description

    The connection ID was not recognized by the ConnectionIdGenerator

    -

    Trait Implementations§

    §

    impl Clone for InvalidCid

    §

    fn clone(&self) -> InvalidCid

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for InvalidCid

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Copy for InvalidCid

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +InvalidCid in noq - Rust

    InvalidCid

    Struct InvalidCid 

    Source
    pub struct InvalidCid;
    Expand description

    The connection ID was not recognized by the ConnectionIdGenerator

    +

    Trait Implementations§

    Source§

    impl Clone for InvalidCid

    Source§

    fn clone(&self) -> InvalidCid

    Returns a duplicate 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 InvalidCid

    Source§

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

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

    impl Copy for InvalidCid

    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 diff --git a/pr/531/docs/noq/struct.MtuDiscoveryConfig.html b/pr/531/docs/noq/struct.MtuDiscoveryConfig.html index 6f8a13ad0..49e9d38cd 100644 --- a/pr/531/docs/noq/struct.MtuDiscoveryConfig.html +++ b/pr/531/docs/noq/struct.MtuDiscoveryConfig.html @@ -1,4 +1,4 @@ -MtuDiscoveryConfig in noq - Rust

    MtuDiscoveryConfig

    Struct MtuDiscoveryConfig 

    pub struct MtuDiscoveryConfig { /* private fields */ }
    Expand description

    Parameters governing MTU discovery.

    +MtuDiscoveryConfig in noq - Rust

    MtuDiscoveryConfig

    Struct MtuDiscoveryConfig 

    Source
    pub struct MtuDiscoveryConfig { /* private fields */ }
    Expand description

    Parameters governing MTU discovery.

    §The why of MTU discovery

    By design, QUIC ensures during the handshake that the network path between the client and the server is able to transmit unfragmented UDP packets with a body of 1200 bytes. In other words, @@ -42,25 +42,25 @@ timer that was set based on Implementations§

    §

    impl MtuDiscoveryConfig

    pub fn interval(&mut self, value: Duration) -> &mut MtuDiscoveryConfig

    Specifies the time to wait after completing MTU discovery before starting a new MTU +

    Implementations§

    Source§

    impl MtuDiscoveryConfig

    Source

    pub fn interval(&mut self, value: Duration) -> &mut MtuDiscoveryConfig

    Specifies the time to wait after completing MTU discovery before starting a new MTU discovery run.

    Defaults to 600 seconds, as recommended by RFC 8899.

    -

    pub fn upper_bound(&mut self, value: u16) -> &mut MtuDiscoveryConfig

    Specifies the upper bound to the max UDP payload size that MTU discovery will search for.

    +
    Source

    pub fn upper_bound(&mut self, value: u16) -> &mut MtuDiscoveryConfig

    Specifies the upper bound to the max UDP payload size that MTU discovery will search for.

    Defaults to 1452, to stay within Ethernet’s MTU when using IPv4 and IPv6. The highest allowed value is 65527, which corresponds to the maximum permitted UDP payload on IPv6.

    It is safe to use an arbitrarily high upper bound, regardless of the network path’s MTU. The only drawback is that MTU discovery might take more time to finish.

    -

    pub fn black_hole_cooldown( +

    Source

    pub fn black_hole_cooldown( &mut self, value: Duration, ) -> &mut MtuDiscoveryConfig

    Specifies the amount of time that MTU discovery should wait after a black hole was detected before running again. Defaults to one minute.

    Black hole detection can be spuriously triggered in case of congestion, so it makes sense to try MTU discovery again after a short period of time.

    -

    pub fn minimum_change(&mut self, value: u16) -> &mut MtuDiscoveryConfig

    Specifies the minimum MTU change to stop the MTU discovery phase. +

    Source

    pub fn minimum_change(&mut self, value: u16) -> &mut MtuDiscoveryConfig

    Specifies the minimum MTU change to stop the MTU discovery phase. Defaults to 20.

    -

    Trait Implementations§

    §

    impl Clone for MtuDiscoveryConfig

    §

    fn clone(&self) -> MtuDiscoveryConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for MtuDiscoveryConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for MtuDiscoveryConfig

    §

    fn default() -> MtuDiscoveryConfig

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for MtuDiscoveryConfig

    Source§

    fn clone(&self) -> MtuDiscoveryConfig

    Returns a duplicate 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 MtuDiscoveryConfig

    Source§

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

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

    impl Default for MtuDiscoveryConfig

    Source§

    fn default() -> MtuDiscoveryConfig

    Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/struct.NoneTokenLog.html b/pr/531/docs/noq/struct.NoneTokenLog.html index eab0ddd81..35a1aa5fe 100644 --- a/pr/531/docs/noq/struct.NoneTokenLog.html +++ b/pr/531/docs/noq/struct.NoneTokenLog.html @@ -1,5 +1,5 @@ -NoneTokenLog in noq - Rust

    NoneTokenLog

    Struct NoneTokenLog 

    pub struct NoneTokenLog;
    Expand description

    Null implementation of TokenLog, which never accepts tokens

    -

    Trait Implementations§

    §

    impl TokenLog for NoneTokenLog

    §

    fn check_and_insert( +NoneTokenLog in noq - Rust

    NoneTokenLog

    Struct NoneTokenLog 

    Source
    pub struct NoneTokenLog;
    Expand description

    Null implementation of TokenLog, which never accepts tokens

    +

    Trait Implementations§

    Source§

    impl TokenLog for NoneTokenLog

    Source§

    fn check_and_insert( &self, _: u128, _: SystemTime, diff --git a/pr/531/docs/noq/struct.NoneTokenStore.html b/pr/531/docs/noq/struct.NoneTokenStore.html index f41989803..ce07dc3f6 100644 --- a/pr/531/docs/noq/struct.NoneTokenStore.html +++ b/pr/531/docs/noq/struct.NoneTokenStore.html @@ -1,5 +1,5 @@ -NoneTokenStore in noq - Rust

    NoneTokenStore

    Struct NoneTokenStore 

    pub struct NoneTokenStore;
    Expand description

    Null implementation of TokenStore, which does not store any tokens

    -

    Trait Implementations§

    §

    impl TokenStore for NoneTokenStore

    §

    fn insert(&self, _: &str, _: Bytes)

    Potentially store a token for later one-time use Read more
    §

    fn take(&self, _: &str) -> Option<Bytes>

    Try to find and take a token that was stored with the given server name Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +NoneTokenStore in noq - Rust

    NoneTokenStore

    Struct NoneTokenStore 

    Source
    pub struct NoneTokenStore;
    Expand description

    Null implementation of TokenStore, which does not store any tokens

    +

    Trait Implementations§

    Source§

    impl TokenStore for NoneTokenStore

    Source§

    fn insert(&self, _: &str, _: Bytes)

    Potentially store a token for later one-time use Read more
    Source§

    fn take(&self, _: &str) -> Option<Bytes>

    Try to find and take a token that was stored with the given server name 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> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/pr/531/docs/noq/struct.OpenPath.html b/pr/531/docs/noq/struct.OpenPath.html index 4cad853e1..847bb563d 100644 --- a/pr/531/docs/noq/struct.OpenPath.html +++ b/pr/531/docs/noq/struct.OpenPath.html @@ -3,7 +3,7 @@

    If an error occurred before a path ID was allocated, None is returned. In this case the future is ready and polling it will immediately yield the error.

    The returned value remains the same for the entire lifetime of this future.

    -

    Trait Implementations§

    Source§

    impl Future for OpenPath

    Source§

    type Output = Result<Path, PathError>

    The type of value produced on completion.
    Source§

    fn poll(self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::Output>

    Attempts to resolve the future to a final value, registering +

    Trait Implementations§

    Source§

    impl Future for OpenPath

    Source§

    type Output = Result<Path, PathError>

    The type of value produced on completion.
    Source§

    fn poll(self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::Output>

    Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. 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 diff --git a/pr/531/docs/noq/struct.Path.html b/pr/531/docs/noq/struct.Path.html index 3374e5b50..eb160423a 100644 --- a/pr/531/docs/noq/struct.Path.html +++ b/pr/531/docs/noq/struct.Path.html @@ -6,29 +6,29 @@ path’s stats are not dropped until the underlying connection is dropped, even if the path is abandoned.

    Source

    pub fn id(&self) -> PathId

    The PathId of this path.

    -
    Source

    pub fn status(&self) -> Result<PathStatus, ClosedPath>

    The current local [PathStatus] of this path.

    -
    Source

    pub fn set_status(&self, status: PathStatus) -> Result<(), SetPathStatusError>

    Sets the [PathStatus] of this path.

    +
    Source

    pub fn status(&self) -> Result<PathStatus, ClosedPath>

    The current local PathStatus of this path.

    +
    Source

    pub fn set_status(&self, status: PathStatus) -> Result<(), SetPathStatusError>

    Sets the PathStatus of this path.

    Source

    pub fn stats(&self) -> PathStats

    Returns the PathStats for this path.

    -
    Source

    pub fn close(&self) -> Result<(), ClosePathError>

    Closes this path.

    +
    Source

    pub fn close(&self) -> Result<(), ClosePathError>

    Closes this path.

    The path is immediately considered closed by the local endpoint. Once the state is removed, -after a short period of time for any in-flight packets, a [PathEvent::Abandoned] is +after a short period of time for any in-flight packets, a PathEvent::Abandoned is returned.

    Source

    pub fn set_max_idle_timeout( &self, timeout: Option<Duration>, -) -> Result<Option<Duration>, ClosedPath>

    Sets the keep_alive_interval for a specific path

    +) -> Result<Option<Duration>, ClosedPath>

    Sets the keep_alive_interval for a specific path

    See TransportConfig::default_path_keep_alive_interval for details.

    Returns the previous value of the setting.

    Source

    pub fn set_keep_alive_interval( &self, interval: Option<Duration>, -) -> Result<Option<Duration>, ClosedPath>

    Sets the keep_alive_interval for a specific path

    +) -> Result<Option<Duration>, ClosedPath>

    Sets the keep_alive_interval for a specific path

    See TransportConfig::default_path_keep_alive_interval for details.

    Returns the previous value of the setting.

    -
    Source

    pub fn observed_external_addr(&self) -> Result<AddressDiscovery, ClosedPath>

    Track changes on our external address as reported by the peer.

    +
    Source

    pub fn observed_external_addr(&self) -> Result<AddressDiscovery, ClosedPath>

    Track changes on our external address as reported by the peer.

    If the address-discovery extension is not negotiated, the stream will never return.

    -
    Source

    pub fn remote_address(&self) -> Result<SocketAddr, ClosedPath>

    The peer’s UDP address for this path.

    -
    Source

    pub fn ping(&self) -> Result<(), ClosedPath>

    Ping the remote endpoint over this path.

    +
    Source

    pub fn remote_address(&self) -> Result<SocketAddr, ClosedPath>

    The peer’s UDP address for this path.

    +
    Source

    pub fn ping(&self) -> Result<(), ClosedPath>

    Ping the remote endpoint over this path.

    Trait Implementations§

    Source§

    impl Clone for Path

    Source§

    fn clone(&self) -> Self

    Returns a duplicate 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 Path

    Source§

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

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

    impl Drop for Path

    Source§

    fn drop(&mut self)

    Executes the destructor for this type. Read more
    Source§

    impl PartialEq for Path

    Source§

    fn eq(&self, other: &Self) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

    Auto Trait Implementations§

    §

    impl Freeze for Path

    §

    impl RefUnwindSafe for Path

    §

    impl Send for Path

    §

    impl Sync for Path

    §

    impl Unpin for Path

    §

    impl UnwindSafe for Path

    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 diff --git a/pr/531/docs/noq/struct.PathId.html b/pr/531/docs/noq/struct.PathId.html index 7acd4d750..86a4cc45d 100644 --- a/pr/531/docs/noq/struct.PathId.html +++ b/pr/531/docs/noq/struct.PathId.html @@ -1,24 +1,24 @@ -PathId in noq - Rust

    PathId

    Struct PathId 

    pub struct PathId(/* private fields */);
    Expand description

    Id representing different paths when using multipath extension

    -

    Implementations§

    §

    impl PathId

    pub const MAX: PathId

    The maximum path ID allowed.

    -

    pub const ZERO: PathId

    The 0 path id.

    -

    pub fn saturating_add(self, rhs: impl Into<PathId>) -> PathId

    Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead +PathId in noq - Rust

    PathId

    Struct PathId 

    Source
    pub struct PathId(/* private fields */);
    Expand description

    Id representing different paths when using multipath extension

    +

    Implementations§

    Source§

    impl PathId

    Source

    pub const MAX: PathId

    The maximum path ID allowed.

    +
    Source

    pub const ZERO: PathId

    The 0 path id.

    +
    Source

    pub fn saturating_add(self, rhs: impl Into<PathId>) -> PathId

    Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

    -

    pub fn saturating_sub(self, rhs: impl Into<PathId>) -> PathId

    Saturating integer subtraction. Computes self - rhs, saturating at the numeric bounds +

    Source

    pub fn saturating_sub(self, rhs: impl Into<PathId>) -> PathId

    Saturating integer subtraction. Computes self - rhs, saturating at the numeric bounds instead of overflowing.

    -

    Trait Implementations§

    §

    impl Clone for PathId

    §

    fn clone(&self) -> PathId

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for PathId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Decodable for PathId

    §

    fn decode<B>(r: &mut B) -> Result<PathId, UnexpectedEnd>
    where - B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    impl Default for PathId

    §

    fn default() -> PathId

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

    impl Display for PathId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Encodable for PathId

    §

    fn encode<B>(&self, w: &mut B)
    where - B: BufMut,

    Append the encoding of self to the provided buffer.
    §

    impl<T> From<T> for PathId
    where - T: Into<u32>,

    §

    fn from(source: T) -> PathId

    Converts to this type from the input type.
    §

    impl Hash for PathId

    §

    fn hash<H>(&self, state: &mut H)
    where +

    Trait Implementations§

    Source§

    impl Clone for PathId

    Source§

    fn clone(&self) -> PathId

    Returns a duplicate 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 PathId

    Source§

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

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

    impl Decodable for PathId

    Source§

    fn decode<B>(r: &mut B) -> Result<PathId, UnexpectedEnd>
    where + B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    Source§

    impl Default for PathId

    Source§

    fn default() -> PathId

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

    impl Display for PathId

    Source§

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

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

    impl Encodable for PathId

    Source§

    fn encode<B>(&self, w: &mut B)
    where + B: BufMut,

    Append the encoding of self to the provided buffer.
    Source§

    impl<T> From<T> for PathId
    where + T: Into<u32>,

    Source§

    fn from(source: T) -> PathId

    Converts to this type from the input type.
    Source§

    impl Hash for PathId

    Source§

    fn hash<H>(&self, state: &mut H)
    where H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for PathId

    §

    fn cmp(&self, other: &PathId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for PathId

    Source§

    fn cmp(&self, other: &PathId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for PathId

    §

    fn eq(&self, other: &PathId) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl PartialOrd for PathId

    §

    fn partial_cmp(&self, other: &PathId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the + Self: Sized,

    Restrict a value to a certain interval. Read more

    Source§

    impl PartialEq for PathId

    Source§

    fn eq(&self, other: &PathId) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl PartialOrd for PathId

    Source§

    fn partial_cmp(&self, other: &PathId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the <= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    §

    impl Copy for PathId

    §

    impl Eq for PathId

    §

    impl IdentityHashable for PathId

    §

    impl StructuralPartialEq for PathId

    Auto Trait Implementations§

    §

    impl Freeze for PathId

    §

    impl RefUnwindSafe for PathId

    §

    impl Send for PathId

    §

    impl Sync for PathId

    §

    impl Unpin for PathId

    §

    impl UnwindSafe for PathId

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +the >= operator. Read more

    Source§

    impl Copy for PathId

    Source§

    impl Eq for PathId

    Source§

    impl IdentityHashable for PathId

    Source§

    impl StructuralPartialEq for PathId

    Auto Trait Implementations§

    §

    impl Freeze for PathId

    §

    impl RefUnwindSafe for PathId

    §

    impl Send for PathId

    §

    impl Sync for PathId

    §

    impl Unpin for PathId

    §

    impl UnwindSafe for PathId

    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 diff --git a/pr/531/docs/noq/struct.PathStats.html b/pr/531/docs/noq/struct.PathStats.html index 29a0b322b..eaec2647d 100644 --- a/pr/531/docs/noq/struct.PathStats.html +++ b/pr/531/docs/noq/struct.PathStats.html @@ -1,4 +1,4 @@ -PathStats in noq - Rust

    PathStats

    Struct PathStats 

    #[non_exhaustive]
    pub struct PathStats { +PathStats in noq - Rust

    PathStats

    Struct PathStats 

    Source
    #[non_exhaustive]
    pub struct PathStats { pub rtt: Duration, pub udp_tx: UdpStats, pub udp_rx: UdpStats, @@ -23,8 +23,8 @@ lost_bytes)

    §black_holes_detected: u64

    The number of times a black hole was detected in the path

    §current_mtu: u16

    Largest UDP payload size the path currently supports

    -

    Trait Implementations§

    §

    impl Clone for PathStats

    §

    fn clone(&self) -> PathStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for PathStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for PathStats

    §

    fn default() -> PathStats

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

    impl PartialEq for PathStats

    §

    fn eq(&self, other: &PathStats) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Copy for PathStats

    §

    impl Eq for PathStats

    §

    impl StructuralPartialEq for PathStats

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for PathStats

    Source§

    fn clone(&self) -> PathStats

    Returns a duplicate 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 PathStats

    Source§

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

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

    impl Default for PathStats

    Source§

    fn default() -> PathStats

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

    impl PartialEq for PathStats

    Source§

    fn eq(&self, other: &PathStats) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Copy for PathStats

    Source§

    impl Eq for PathStats

    Source§

    impl StructuralPartialEq for PathStats

    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 diff --git a/pr/531/docs/noq/struct.QlogConfig.html b/pr/531/docs/noq/struct.QlogConfig.html index 585c4fba0..5196e362e 100644 --- a/pr/531/docs/noq/struct.QlogConfig.html +++ b/pr/531/docs/noq/struct.QlogConfig.html @@ -1,12 +1,12 @@ -QlogConfig in noq - Rust

    QlogConfig

    Struct QlogConfig 

    pub struct QlogConfig { /* private fields */ }
    Expand description

    Configuration for qlog trace logging.

    +QlogConfig in noq - Rust

    QlogConfig

    Struct QlogConfig 

    Source
    pub struct QlogConfig { /* private fields */ }
    Expand description

    Configuration for qlog trace logging.

    This struct is returned from QlogFactory::for_connection if qlog logging should be enabled for a connection. It allows to set metadata for the qlog trace.

    The trace will be written to the provided writer in the [JSON-SEQ format] defined in the qlog spec.

    JSON-SEQ format

    -

    Implementations§

    §

    impl QlogConfig

    pub fn new(writer: Box<dyn Write + Send + Sync>) -> QlogConfig

    Creates a new QlogConfig that writes a qlog trace to the specified writer.

    -

    pub fn title(&mut self, title: Option<String>) -> &mut QlogConfig

    Title to record in the qlog capture

    -

    pub fn description(&mut self, description: Option<String>) -> &mut QlogConfig

    Description to record in the qlog capture

    -

    pub fn start_time(&mut self, start_time: Instant) -> &mut QlogConfig

    Epoch qlog event times are recorded relative to

    +

    Implementations§

    Source§

    impl QlogConfig

    Source

    pub fn new(writer: Box<dyn Write + Send + Sync>) -> QlogConfig

    Creates a new QlogConfig that writes a qlog trace to the specified writer.

    +
    Source

    pub fn title(&mut self, title: Option<String>) -> &mut QlogConfig

    Title to record in the qlog capture

    +
    Source

    pub fn description(&mut self, description: Option<String>) -> &mut QlogConfig

    Description to record in the qlog capture

    +
    Source

    pub fn start_time(&mut self, start_time: Instant) -> &mut QlogConfig

    Epoch qlog event times are recorded relative to

    If unset, the start of the connection is used.

    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 diff --git a/pr/531/docs/noq/struct.QlogFileFactory.html b/pr/531/docs/noq/struct.QlogFileFactory.html index a7b6aeb6a..8b399cd24 100644 --- a/pr/531/docs/noq/struct.QlogFileFactory.html +++ b/pr/531/docs/noq/struct.QlogFileFactory.html @@ -1,13 +1,13 @@ -QlogFileFactory in noq - Rust

    QlogFileFactory

    Struct QlogFileFactory 

    pub struct QlogFileFactory { /* private fields */ }
    Expand description

    Enables writing qlog traces to a directory.

    -

    Implementations§

    §

    impl QlogFileFactory

    pub fn new(dir: PathBuf) -> QlogFileFactory

    Creates a new qlog factory that writes files into the specified directory.

    -

    pub fn from_env() -> QlogFileFactory

    Creates a new qlog factory that writes files into QLOGDIR, if set.

    +QlogFileFactory in noq - Rust

    QlogFileFactory

    Struct QlogFileFactory 

    Source
    pub struct QlogFileFactory { /* private fields */ }
    Expand description

    Enables writing qlog traces to a directory.

    +

    Implementations§

    Source§

    impl QlogFileFactory

    Source

    pub fn new(dir: PathBuf) -> QlogFileFactory

    Creates a new qlog factory that writes files into the specified directory.

    +
    Source

    pub fn from_env() -> QlogFileFactory

    Creates a new qlog factory that writes files into QLOGDIR, if set.

    If the environment variable QLOGDIR is set, qlog traces for all connections handled by this endpoint will be written into that directory. If the directory doesn’t exist it will be created.

    -

    pub fn with_prefix(self, prefix: impl ToString) -> QlogFileFactory

    Sets a prefix to the filename of the generated files.

    -

    pub fn with_start_instant(self, start: Instant) -> QlogFileFactory

    Override the instant relative to which all events are recorded.

    +
    Source

    pub fn with_prefix(self, prefix: impl ToString) -> QlogFileFactory

    Sets a prefix to the filename of the generated files.

    +
    Source

    pub fn with_start_instant(self, start: Instant) -> QlogFileFactory

    Override the instant relative to which all events are recorded.

    If not set, events will be recorded relative to the start of the connection.

    -

    Trait Implementations§

    §

    impl Debug for QlogFileFactory

    §

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

    Formats the value using the given formatter. Read more
    §

    impl QlogFactory for QlogFileFactory

    Trait Implementations§

    Source§

    impl Debug for QlogFileFactory

    Source§

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

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

    impl QlogFactory for QlogFileFactory

    Source§

    fn for_connection( &self, side: Side, _remote: SocketAddr, diff --git a/pr/531/docs/noq/struct.ServerConfig.html b/pr/531/docs/noq/struct.ServerConfig.html index 3d5b89606..58897f301 100644 --- a/pr/531/docs/noq/struct.ServerConfig.html +++ b/pr/531/docs/noq/struct.ServerConfig.html @@ -1,4 +1,4 @@ -ServerConfig in noq - Rust

    ServerConfig

    Struct ServerConfig 

    pub struct ServerConfig {
    +ServerConfig in noq - Rust

    ServerConfig

    Struct ServerConfig 

    Source
    pub struct ServerConfig {
         pub transport: Arc<TransportConfig>,
         pub crypto: Arc<dyn ServerConfig>,
         pub validation_token: ValidationTokenConfig,
    @@ -9,39 +9,39 @@
     
    §crypto: Arc<dyn ServerConfig>

    TLS configuration used for incoming connections

    Must be set to use TLS 1.3 only.

    §validation_token: ValidationTokenConfig

    Configuration for sending and handling validation tokens

    -

    Implementations§

    §

    impl ServerConfig

    pub fn new( +

    Implementations§

    Source§

    impl ServerConfig

    Source

    pub fn new( crypto: Arc<dyn ServerConfig>, token_key: Arc<dyn HandshakeTokenKey>, ) -> ServerConfig

    Create a default config with a particular handshake token key

    -

    pub fn transport_config( +

    Source

    pub fn transport_config( &mut self, transport: Arc<TransportConfig>, ) -> &mut ServerConfig

    Set a custom TransportConfig

    -

    pub fn validation_token_config( +

    Source

    pub fn validation_token_config( &mut self, validation_token: ValidationTokenConfig, ) -> &mut ServerConfig

    Set a custom ValidationTokenConfig

    -

    pub fn token_key( +

    Source

    pub fn token_key( &mut self, value: Arc<dyn HandshakeTokenKey>, ) -> &mut ServerConfig

    Private key used to authenticate data included in handshake tokens

    -

    pub fn retry_token_lifetime(&mut self, value: Duration) -> &mut ServerConfig

    Duration after a retry token was issued for which it’s considered valid

    +
    Source

    pub fn retry_token_lifetime(&mut self, value: Duration) -> &mut ServerConfig

    Duration after a retry token was issued for which it’s considered valid

    Defaults to 15 seconds.

    -

    pub fn migration(&mut self, value: bool) -> &mut ServerConfig

    Whether to allow clients to migrate to new addresses

    +
    Source

    pub fn migration(&mut self, value: bool) -> &mut ServerConfig

    Whether to allow clients to migrate to new addresses

    Improves behavior for clients that move between different internet connections or suffer NAT rebinding. Enabled by default.

    -

    pub fn preferred_address_v4( +

    Source

    pub fn preferred_address_v4( &mut self, address: Option<SocketAddrV4>, ) -> &mut ServerConfig

    The preferred IPv4 address that will be communicated to clients during handshaking

    If the client is able to reach this address, it will switch to it.

    -

    pub fn preferred_address_v6( +

    Source

    pub fn preferred_address_v6( &mut self, address: Option<SocketAddrV6>, ) -> &mut ServerConfig

    The preferred IPv6 address that will be communicated to clients during handshaking

    If the client is able to reach this address, it will switch to it.

    -

    pub fn max_incoming(&mut self, max_incoming: usize) -> &mut ServerConfig

    Maximum number of [Incoming][crate::Incoming] to allow to exist at a time

    -

    An [Incoming][crate::Incoming] comes into existence when an incoming connection attempt +

    Source

    pub fn max_incoming(&mut self, max_incoming: usize) -> &mut ServerConfig

    Maximum number of Incoming to allow to exist at a time

    +

    An Incoming comes into existence when an incoming connection attempt is received and stops existing when the application either accepts it or otherwise disposes of it. While this limit is reached, new incoming connection attempts are immediately refused. Larger values have greater worst-case memory consumption, but accommodate greater @@ -49,44 +49,44 @@ application latency in handling incoming connection attempts.

    The default value is set to 65536. With a typical Ethernet MTU of 1500 bytes, this limits memory consumption from this to under 100 MiB–a generous amount that still prevents memory exhaustion in most contexts.

    -

    pub fn incoming_buffer_size( +

    Source

    pub fn incoming_buffer_size( &mut self, incoming_buffer_size: u64, -) -> &mut ServerConfig

    Maximum number of received bytes to buffer for each [Incoming][crate::Incoming]

    -

    An [Incoming][crate::Incoming] comes into existence when an incoming connection attempt +) -> &mut ServerConfig

    Maximum number of received bytes to buffer for each Incoming

    +

    An Incoming comes into existence when an incoming connection attempt is received and stops existing when the application either accepts it or otherwise disposes of it. This limit governs only packets received within that period, and does not include the first packet. Packets received in excess of this limit are dropped, which may cause 0-RTT or handshake data to have to be retransmitted.

    The default value is set to 10 MiB–an amount such that in most situations a client would not transmit that much 0-RTT data faster than the server handles the corresponding -[Incoming][crate::Incoming].

    -

    pub fn incoming_buffer_size_total( +Incoming.

    +

    Source

    pub fn incoming_buffer_size_total( &mut self, incoming_buffer_size_total: u64, -) -> &mut ServerConfig

    Maximum number of received bytes to buffer for all [Incoming][crate::Incoming] +) -> &mut ServerConfig

    Maximum number of received bytes to buffer for all Incoming collectively

    -

    An [Incoming][crate::Incoming] comes into existence when an incoming connection attempt +

    An Incoming comes into existence when an incoming connection attempt is received and stops existing when the application either accepts it or otherwise disposes of it. This limit governs only packets received within that period, and does not include the first packet. Packets received in excess of this limit are dropped, which may cause 0-RTT or handshake data to have to be retransmitted.

    The default value is set to 100 MiB–a generous amount that still prevents memory exhaustion in most contexts.

    -

    pub fn time_source( +

    Source

    pub fn time_source( &mut self, time_source: Arc<dyn TimeSource>, ) -> &mut ServerConfig

    Object to get current SystemTime

    This exists to allow system time to be mocked in tests, or wherever else desired.

    Defaults to StdSystemTime, which simply calls SystemTime::now().

    -

    §

    impl ServerConfig

    Source§

    impl ServerConfig

    Source

    pub fn with_single_cert( cert_chain: Vec<CertificateDer<'static>>, key: PrivateKeyDer<'static>, ) -> Result<ServerConfig, Error>

    Create a server config with the given certificate chain to be presented to clients

    Uses a randomized handshake token key.

    -
    §

    impl ServerConfig

    pub fn with_crypto(crypto: Arc<dyn ServerConfig>) -> ServerConfig

    Create a server config with the given crypto::ServerConfig

    +
    Source§

    impl ServerConfig

    Source

    pub fn with_crypto(crypto: Arc<dyn ServerConfig>) -> ServerConfig

    Create a server config with the given crypto::ServerConfig

    Uses a randomized handshake token key.

    -

    Trait Implementations§

    §

    impl Clone for ServerConfig

    §

    fn clone(&self) -> ServerConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ServerConfig

    §

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ServerConfig

    Source§

    fn clone(&self) -> ServerConfig

    Returns a duplicate 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 ServerConfig

    Source§

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

    Formats the value using the given formatter. 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 diff --git a/pr/531/docs/noq/struct.StdSystemTime.html b/pr/531/docs/noq/struct.StdSystemTime.html index 5f058c581..e05944e7b 100644 --- a/pr/531/docs/noq/struct.StdSystemTime.html +++ b/pr/531/docs/noq/struct.StdSystemTime.html @@ -1,6 +1,6 @@ -StdSystemTime in noq - Rust

    StdSystemTime

    Struct StdSystemTime 

    pub struct StdSystemTime;
    Expand description

    Default implementation of TimeSource

    +StdSystemTime in noq - Rust

    StdSystemTime

    Struct StdSystemTime 

    Source
    pub struct StdSystemTime;
    Expand description

    Default implementation of TimeSource

    Implements now by calling SystemTime::now().

    -

    Trait Implementations§

    §

    impl TimeSource for StdSystemTime

    §

    fn now(&self) -> SystemTime

    Get SystemTime::now() or the mocked equivalent

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl TimeSource for StdSystemTime

    Source§

    fn now(&self) -> SystemTime

    Get SystemTime::now() or the mocked equivalent

    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> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/pr/531/docs/noq/struct.StreamId.html b/pr/531/docs/noq/struct.StreamId.html index e19f72a09..65302a06e 100644 --- a/pr/531/docs/noq/struct.StreamId.html +++ b/pr/531/docs/noq/struct.StreamId.html @@ -1,26 +1,26 @@ -StreamId in noq - Rust

    StreamId

    Struct StreamId 

    pub struct StreamId(/* private fields */);
    Expand description

    Identifier for a stream within a particular connection

    -

    Implementations§

    §

    impl StreamId

    pub fn new(initiator: Side, dir: Dir, index: u64) -> StreamId

    Create a new StreamId

    -

    pub fn initiator(self) -> Side

    Which side of a connection initiated the stream

    -

    pub fn dir(self) -> Dir

    Which directions data flows in

    -

    pub fn index(self) -> u64

    Distinguishes streams of the same initiator and directionality

    -

    Trait Implementations§

    §

    impl<'arbitrary> Arbitrary<'arbitrary> for StreamId

    §

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<StreamId, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    §

    fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

    Generate an arbitrary value of Self from the entirety of the given +StreamId in noq - Rust

    StreamId

    Struct StreamId 

    Source
    pub struct StreamId(/* private fields */);
    Expand description

    Identifier for a stream within a particular connection

    +

    Implementations§

    Source§

    impl StreamId

    Source

    pub fn new(initiator: Side, dir: Dir, index: u64) -> StreamId

    Create a new StreamId

    +
    Source

    pub fn initiator(self) -> Side

    Which side of a connection initiated the stream

    +
    Source

    pub fn dir(self) -> Dir

    Which directions data flows in

    +
    Source

    pub fn index(self) -> u64

    Distinguishes streams of the same initiator and directionality

    +

    Trait Implementations§

    Source§

    impl<'arbitrary> Arbitrary<'arbitrary> for StreamId

    Source§

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<StreamId, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    §

    fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

    Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
    §

    fn size_hint(depth: usize) -> (usize, Option<usize>)

    Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
    §

    fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

    Get a size hint for how many bytes out of an Unstructured this type -needs to construct itself. Read more
    §

    impl Clone for StreamId

    §

    fn clone(&self) -> StreamId

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for StreamId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Decodable for StreamId

    §

    fn decode<B>(buf: &mut B) -> Result<StreamId, UnexpectedEnd>
    where - B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    impl Display for StreamId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Encodable for StreamId

    §

    fn encode<B>(&self, buf: &mut B)
    where - B: BufMut,

    Append the encoding of self to the provided buffer.
    §

    impl From<StreamId> for VarInt

    §

    fn from(x: StreamId) -> VarInt

    Converts to this type from the input type.
    §

    impl From<VarInt> for StreamId

    §

    fn from(v: VarInt) -> StreamId

    Converts to this type from the input type.
    §

    impl Hash for StreamId

    §

    fn hash<__H>(&self, state: &mut __H)
    where +needs to construct itself. Read more

    Source§

    impl Clone for StreamId

    Source§

    fn clone(&self) -> StreamId

    Returns a duplicate 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 StreamId

    Source§

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

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

    impl Decodable for StreamId

    Source§

    fn decode<B>(buf: &mut B) -> Result<StreamId, UnexpectedEnd>
    where + B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    Source§

    impl Display for StreamId

    Source§

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

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

    impl Encodable for StreamId

    Source§

    fn encode<B>(&self, buf: &mut B)
    where + B: BufMut,

    Append the encoding of self to the provided buffer.
    Source§

    impl From<StreamId> for VarInt

    Source§

    fn from(x: StreamId) -> VarInt

    Converts to this type from the input type.
    Source§

    impl From<VarInt> for StreamId

    Source§

    fn from(v: VarInt) -> StreamId

    Converts to this type from the input type.
    Source§

    impl Hash for StreamId

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for StreamId

    §

    fn cmp(&self, other: &StreamId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for StreamId

    Source§

    fn cmp(&self, other: &StreamId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for StreamId

    §

    fn eq(&self, other: &StreamId) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl PartialOrd for StreamId

    §

    fn partial_cmp(&self, other: &StreamId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for StreamId

    Source§

    fn eq(&self, other: &StreamId) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl PartialOrd for StreamId

    Source§

    fn partial_cmp(&self, other: &StreamId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the <= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    §

    impl Copy for StreamId

    §

    impl Eq for StreamId

    §

    impl StructuralPartialEq for StreamId

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +the >= operator. Read more

    Source§

    impl Copy for StreamId

    Source§

    impl Eq for StreamId

    Source§

    impl StructuralPartialEq for StreamId

    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 diff --git a/pr/531/docs/noq/struct.TokenMemoryCache.html b/pr/531/docs/noq/struct.TokenMemoryCache.html index 48163a37f..6caa3cf45 100644 --- a/pr/531/docs/noq/struct.TokenMemoryCache.html +++ b/pr/531/docs/noq/struct.TokenMemoryCache.html @@ -1,11 +1,11 @@ -TokenMemoryCache in noq - Rust

    TokenMemoryCache

    Struct TokenMemoryCache 

    pub struct TokenMemoryCache(/* private fields */);
    Expand description

    TokenStore implementation that stores up to N tokens per server name for up to a +TokenMemoryCache in noq - Rust

    TokenMemoryCache

    Struct TokenMemoryCache 

    Source
    pub struct TokenMemoryCache(/* private fields */);
    Expand description

    TokenStore implementation that stores up to N tokens per server name for up to a limited number of server names, in-memory

    -

    Implementations§

    §

    impl TokenMemoryCache

    pub fn new( +

    Implementations§

    Source§

    impl TokenMemoryCache

    Source

    pub fn new( max_server_names: u32, max_tokens_per_server: usize, ) -> TokenMemoryCache

    Construct empty

    -

    Trait Implementations§

    §

    impl Debug for TokenMemoryCache

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for TokenMemoryCache

    Defaults to a maximum of 256 servers and 2 tokens per server

    -
    §

    fn default() -> TokenMemoryCache

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

    impl TokenStore for TokenMemoryCache

    §

    fn insert(&self, server_name: &str, token: Bytes)

    Potentially store a token for later one-time use Read more
    §

    fn take(&self, server_name: &str) -> Option<Bytes>

    Try to find and take a token that was stored with the given server name Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for TokenMemoryCache

    Source§

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

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

    impl Default for TokenMemoryCache

    Defaults to a maximum of 256 servers and 2 tokens per server

    +
    Source§

    fn default() -> TokenMemoryCache

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

    impl TokenStore for TokenMemoryCache

    Source§

    fn insert(&self, server_name: &str, token: Bytes)

    Potentially store a token for later one-time use Read more
    Source§

    fn take(&self, server_name: &str) -> Option<Bytes>

    Try to find and take a token that was stored with the given server name 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> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/pr/531/docs/noq/struct.TokenReuseError.html b/pr/531/docs/noq/struct.TokenReuseError.html index 44648e5cd..671777fd3 100644 --- a/pr/531/docs/noq/struct.TokenReuseError.html +++ b/pr/531/docs/noq/struct.TokenReuseError.html @@ -1,4 +1,4 @@ -TokenReuseError in noq - Rust

    TokenReuseError

    Struct TokenReuseError 

    pub struct TokenReuseError;
    Expand description

    Error for when a validation token may have been reused

    +TokenReuseError in noq - Rust

    TokenReuseError

    Struct TokenReuseError 

    Source
    pub struct TokenReuseError;
    Expand description

    Error for when a validation token may have been reused

    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 diff --git a/pr/531/docs/noq/struct.Transmit.html b/pr/531/docs/noq/struct.Transmit.html index 6f6043eed..f9d06ac01 100644 --- a/pr/531/docs/noq/struct.Transmit.html +++ b/pr/531/docs/noq/struct.Transmit.html @@ -1,4 +1,4 @@ -Transmit in noq - Rust

    Transmit

    Struct Transmit 

    pub struct Transmit {
    +Transmit in noq - Rust

    Transmit

    Struct Transmit 

    Source
    pub struct Transmit {
         pub destination: SocketAddr,
         pub ecn: Option<EcnCodepoint>,
         pub size: usize,
    @@ -11,7 +11,7 @@
     
    §segment_size: Option<usize>

    The segment size if this transmission contains multiple datagrams. This is None if the transmit only contains a single datagram

    §src_ip: Option<IpAddr>

    Optional source IP address for the datagram

    -

    Trait Implementations§

    §

    impl Debug for Transmit

    §

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Transmit

    Source§

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

    Formats the value using the given formatter. 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> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/pr/531/docs/noq/struct.TransportConfig.html b/pr/531/docs/noq/struct.TransportConfig.html index 6487fdce3..363483ef1 100644 --- a/pr/531/docs/noq/struct.TransportConfig.html +++ b/pr/531/docs/noq/struct.TransportConfig.html @@ -1,4 +1,4 @@ -TransportConfig in noq - Rust

    TransportConfig

    Struct TransportConfig 

    pub struct TransportConfig { /* private fields */ }
    Expand description

    Parameters governing the core QUIC state machine

    +TransportConfig in noq - Rust

    TransportConfig

    Struct TransportConfig 

    Source
    pub struct TransportConfig { /* private fields */ }
    Expand description

    Parameters governing the core QUIC state machine

    Default values should be suitable for most internet applications. Applications protocols which forbid remotely-initiated streams should set max_concurrent_bidi_streams and max_concurrent_uni_streams to zero.

    @@ -8,17 +8,17 @@ tuned for a particular expected round trip time, link capacity, and memory avail for higher bandwidths and latencies increases worst-case memory consumption, but does not impair performance at lower bandwidths and latencies. The default configuration is tuned for a 100Mbps link with a 100ms round trip time.

    -

    Implementations§

    §

    impl TransportConfig

    Implementations§

    Source§

    impl TransportConfig

    Source

    pub fn max_concurrent_bidi_streams( &mut self, value: VarInt, ) -> &mut TransportConfig

    Maximum number of incoming bidirectional streams that may be open concurrently

    Must be nonzero for the peer to open any bidirectional streams.

    Worst-case memory use is directly proportional to max_concurrent_bidi_streams * stream_receive_window, with an upper bound proportional to receive_window.

    -

    pub fn max_concurrent_uni_streams( +

    Source

    pub fn max_concurrent_uni_streams( &mut self, value: VarInt, ) -> &mut TransportConfig

    Variant of max_concurrent_bidi_streams affecting unidirectional streams

    -

    pub fn max_idle_timeout( +

    Source

    pub fn max_idle_timeout( &mut self, value: Option<IdleTimeout>, ) -> &mut TransportConfig

    Maximum duration of inactivity to accept before timing out the connection.

    @@ -33,43 +33,43 @@ idle timeout can result in permanently hung futures!

    config.max_idle_timeout(Some(VarInt::from_u32(10_000).into())); // Set the idle timeout as a `Duration` -config.max_idle_timeout(Some(Duration::from_secs(10).try_into()?));

    pub fn stream_receive_window(&mut self, value: VarInt) -> &mut TransportConfig

    Maximum number of bytes the peer may transmit without acknowledgement on any one stream +config.max_idle_timeout(Some(Duration::from_secs(10).try_into()?));

    Source

    pub fn stream_receive_window(&mut self, value: VarInt) -> &mut TransportConfig

    Maximum number of bytes the peer may transmit without acknowledgement on any one stream before becoming blocked.

    This should be set to at least the expected connection latency multiplied by the maximum desired throughput. Setting this smaller than receive_window helps ensure that a single stream doesn’t monopolize receive buffers, which may otherwise occur if the application chooses not to read from a large stream for a time while still requiring data on other streams.

    -

    pub fn receive_window(&mut self, value: VarInt) -> &mut TransportConfig

    Maximum number of bytes the peer may transmit across all streams of a connection before +

    Source

    pub fn receive_window(&mut self, value: VarInt) -> &mut TransportConfig

    Maximum number of bytes the peer may transmit across all streams of a connection before becoming blocked.

    This should be set to at least the expected connection latency multiplied by the maximum desired throughput. Larger values can be useful to allow maximum throughput within a stream while another is blocked.

    -

    pub fn send_window(&mut self, value: u64) -> &mut TransportConfig

    Maximum number of bytes to transmit to a peer without acknowledgment

    +
    Source

    pub fn send_window(&mut self, value: u64) -> &mut TransportConfig

    Maximum number of bytes to transmit to a peer without acknowledgment

    Provides an upper bound on memory when communicating with peers that issue large amounts of flow control credit. Endpoints that wish to handle large numbers of connections robustly should take care to set this low enough to guarantee memory exhaustion does not occur if every connection uses the entire window.

    -

    pub fn send_fairness(&mut self, value: bool) -> &mut TransportConfig

    Whether to implement fair queuing for send streams having the same priority.

    +
    Source

    pub fn send_fairness(&mut self, value: bool) -> &mut TransportConfig

    Whether to implement fair queuing for send streams having the same priority.

    When enabled, connections schedule data from outgoing streams having the same priority in a round-robin fashion. When disabled, streams are scheduled in the order they are written to.

    Note that this only affects streams with the same priority. Higher priority streams always take precedence over lower priority streams.

    Disabling fairness can reduce fragmentation and protocol overhead for workloads that use many small streams.

    -

    pub fn packet_threshold(&mut self, value: u32) -> &mut TransportConfig

    Maximum reordering in packet number space before FACK style loss detection considers a +

    Source

    pub fn packet_threshold(&mut self, value: u32) -> &mut TransportConfig

    Maximum reordering in packet number space before FACK style loss detection considers a packet lost. Should not be less than 3, per RFC5681.

    -

    pub fn time_threshold(&mut self, value: f32) -> &mut TransportConfig

    Maximum reordering in time space before time based loss detection considers a packet lost, +

    Source

    pub fn time_threshold(&mut self, value: f32) -> &mut TransportConfig

    Maximum reordering in time space before time based loss detection considers a packet lost, as a factor of RTT

    -

    pub fn initial_rtt(&mut self, value: Duration) -> &mut TransportConfig

    The RTT used before an RTT sample is taken

    -

    pub fn initial_mtu(&mut self, value: u16) -> &mut TransportConfig

    The initial value to be used as the maximum UDP payload size before running MTU discovery +

    Source

    pub fn initial_rtt(&mut self, value: Duration) -> &mut TransportConfig

    The RTT used before an RTT sample is taken

    +
    Source

    pub fn initial_mtu(&mut self, value: u16) -> &mut TransportConfig

    The initial value to be used as the maximum UDP payload size before running MTU discovery (see TransportConfig::mtu_discovery_config).

    Must be at least 1200, which is the default, and known to be safe for typical internet applications. Larger values are more efficient, but increase the risk of packet loss due to exceeding the network path’s IP MTU. If the provided value is higher than what the network path actually supports, packet loss will eventually trigger black hole detection and bring it down to TransportConfig::min_mtu.

    -

    pub fn min_mtu(&mut self, value: u16) -> &mut TransportConfig

    The maximum UDP payload size guaranteed to be supported by the network.

    +
    Source

    pub fn min_mtu(&mut self, value: u16) -> &mut TransportConfig

    The maximum UDP payload size guaranteed to be supported by the network.

    Must be at least 1200, which is the default, and lower than or equal to TransportConfig::initial_mtu.

    Real-world MTUs can vary according to ISP, VPN, and properties of intermediate network links @@ -80,19 +80,19 @@ catastrophic packet loss, without a possibility of repair. Prefer TransportConfig::initial_mtu together with TransportConfig::mtu_discovery_config to set a maximum UDP payload size that robustly adapts to the network.

    -

    pub fn mtu_discovery_config( +

    Source

    pub fn mtu_discovery_config( &mut self, value: Option<MtuDiscoveryConfig>, ) -> &mut TransportConfig

    Specifies the MTU discovery config (see MtuDiscoveryConfig for details).

    Enabled by default.

    -

    pub fn pad_to_mtu(&mut self, value: bool) -> &mut TransportConfig

    Pad UDP datagrams carrying application data to current maximum UDP payload size

    +
    Source

    pub fn pad_to_mtu(&mut self, value: bool) -> &mut TransportConfig

    Pad UDP datagrams carrying application data to current maximum UDP payload size

    Disabled by default. UDP datagrams containing loss probes are exempt from padding.

    Enabling this helps mitigate traffic analysis by network observers, but it increases bandwidth usage. Without this mitigation precise plain text size of application datagrams as well as the total size of stream write bursts can be inferred by observers under certain conditions. This analysis requires either an uncongested connection or application datagrams too large to be coalesced.

    -

    pub fn ack_frequency_config( +

    Source

    pub fn ack_frequency_config( &mut self, value: Option<AckFrequencyConfig>, ) -> &mut TransportConfig

    Specifies the ACK frequency config (see AckFrequencyConfig for details)

    @@ -101,11 +101,11 @@ frequency QUIC extension.

    Defaults to None, which disables controlling the peer’s acknowledgement frequency. Even if set to None, the local side still supports the acknowledgement frequency QUIC extension and may use it in other ways.

    -

    pub fn persistent_congestion_threshold( +

    Source

    pub fn persistent_congestion_threshold( &mut self, value: u32, ) -> &mut TransportConfig

    Number of consecutive PTOs after which network is considered to be experiencing persistent congestion.

    -

    pub fn keep_alive_interval( +

    Source

    pub fn keep_alive_interval( &mut self, value: Option<Duration>, ) -> &mut TransportConfig

    Period of inactivity before sending a keep-alive packet

    @@ -113,11 +113,11 @@ extension and may use it in other ways.

    None to disable, which is the default. Only one side of any given connection needs keep-alive enabled for the connection to be preserved. Must be set lower than the idle_timeout of both peers to be effective.

    -

    pub fn crypto_buffer_size(&mut self, value: usize) -> &mut TransportConfig

    Maximum quantity of out-of-order crypto layer data to buffer

    -

    pub fn allow_spin(&mut self, value: bool) -> &mut TransportConfig

    Whether the implementation is permitted to set the spin bit on this connection

    +
    Source

    pub fn crypto_buffer_size(&mut self, value: usize) -> &mut TransportConfig

    Maximum quantity of out-of-order crypto layer data to buffer

    +
    Source

    pub fn allow_spin(&mut self, value: bool) -> &mut TransportConfig

    Whether the implementation is permitted to set the spin bit on this connection

    This allows passive observers to easily judge the round trip time of a connection, which can be useful for network administration but sacrifices a small amount of privacy.

    -

    pub fn datagram_receive_buffer_size( +

    Source

    pub fn datagram_receive_buffer_size( &mut self, value: Option<usize>, ) -> &mut TransportConfig

    Maximum number of incoming application datagram bytes to buffer, or None to disable @@ -125,7 +125,7 @@ incoming datagrams

    The peer is forbidden to send single datagrams larger than this size. If the aggregate size of all datagrams that have been received from the peer but not consumed by the application exceeds this value, old datagrams are dropped until it is no longer exceeded.

    -

    pub fn datagram_send_buffer_size( +

    Source

    pub fn datagram_send_buffer_size( &mut self, value: usize, ) -> &mut TransportConfig

    Maximum number of outgoing application datagram bytes to buffer

    @@ -133,7 +133,7 @@ exceeds this value, old datagrams are dropped until it is no longer exceeded.

    -

    pub fn congestion_controller_factory( +

    Source

    pub fn congestion_controller_factory( &mut self, factory: Arc<dyn ControllerFactory + Send + Sync>, ) -> &mut TransportConfig

    How to construct new congestion::Controllers

    @@ -141,7 +141,7 @@ sent, older datagrams are dropped until sufficient space is available.

    e.g. a congestion::NewRenoConfig.

    §Example
    let mut config = TransportConfig::default();
    -config.congestion_controller_factory(Arc::new(congestion::NewRenoConfig::default()));

    pub fn enable_segmentation_offload( +config.congestion_controller_factory(Arc::new(congestion::NewRenoConfig::default()));

    Source

    pub fn enable_segmentation_offload( &mut self, enabled: bool, ) -> &mut TransportConfig

    Whether to use “Generic Segmentation Offload” to accelerate transmits, when supported by the @@ -152,13 +152,13 @@ headers, such as when transmitting bulk data on a connection. However, it is not by all network interface drivers or packet inspection tools. noq-udp will attempt to disable GSO automatically when unavailable, but this can lead to spurious packet loss at startup, temporarily degrading performance.

    -

    pub fn send_observed_address_reports( +

    Source

    pub fn send_observed_address_reports( &mut self, enabled: bool, ) -> &mut TransportConfig

    Whether to send observed address reports to peers.

    This will aid peers in inferring their reachable address, which in most NATd networks will not be easily available to them.

    -

    pub fn receive_observed_address_reports( +

    Source

    pub fn receive_observed_address_reports( &mut self, enabled: bool, ) -> &mut TransportConfig

    Whether to receive observed address reports from other peers.

    @@ -166,7 +166,7 @@ will not be easily available to them.

    address reports will do so if this transport parameter is set. In general, observed address reports cannot be trusted. This, however, can aid the current endpoint in inferring its reachable address, which in most NATd networks will not be easily available.

    -

    pub fn max_concurrent_multipath_paths( +

    Source

    pub fn max_concurrent_multipath_paths( &mut self, max_concurrent: u32, ) -> &mut TransportConfig

    Enables the Multipath Extension for QUIC.

    @@ -175,16 +175,16 @@ reachable address, which in most NATd networks will not be easily available.

    The value provided specifies the number maximum number of paths this endpoint may open concurrently when multipath is negotiated. For any path to be opened, the remote must enable multipath as well.

    -

    pub fn default_path_max_idle_timeout( +

    Source

    pub fn default_path_max_idle_timeout( &mut self, timeout: Option<Duration>, ) -> &mut TransportConfig

    Sets a default per-path maximum idle timeout

    If the path is idle for this long the path will be abandoned. Bear in mind this will interact with the TransportConfig::max_idle_timeout, if the last path is abandoned the entire connection will be closed.

    -

    You can also change this using Connection::set_path_max_idle_timeout for +

    You can also change this using Connection::set_path_max_idle_timeout for existing paths.

    -

    pub fn default_path_keep_alive_interval( +

    Source

    pub fn default_path_keep_alive_interval( &mut self, interval: Option<Duration>, ) -> &mut TransportConfig

    Sets a default per-path keep alive interval

    @@ -192,9 +192,9 @@ existing paths.

    TransportConfig::keep_alive_interval. This setting will keep this path active, TransportConfig::keep_alive_interval will keep the connection active, with no control over which path is used for this.

    -

    You can also change this using Connection::set_path_keep_alive_interval for +

    You can also change this using Connection::set_path_keep_alive_interval for existing path.

    -

    pub fn set_max_remote_nat_traversal_addresses( +

    Source

    pub fn set_max_remote_nat_traversal_addresses( &mut self, max_addresses: u8, ) -> &mut TransportConfig

    Sets the maximum number of nat traversal addresses this endpoint allows the remote to @@ -205,26 +205,26 @@ the Nat Traversal Extension for QUIC, see

    This implementation expects the multipath extension to be enabled as well. if not yet enabled via Self::max_concurrent_multipath_paths, a default value of [DEFAULT_CONCURRENT_MULTIPATH_PATHS_WHEN_ENABLED] will be used.

    -

    pub fn qlog_factory( +

    Source

    pub fn qlog_factory( &mut self, factory: Arc<dyn QlogFactory>, ) -> &mut TransportConfig

    Configures qlog capturing by setting a QlogFactory.

    This assigns a QlogFactory that produces qlog capture configurations for individual connections.

    -

    pub fn qlog_from_env(&mut self, prefix: &str) -> &mut TransportConfig

    Configures qlog capturing through the QLOGDIR environment variable.

    +
    Source

    pub fn qlog_from_env(&mut self, prefix: &str) -> &mut TransportConfig

    Configures qlog capturing through the QLOGDIR environment variable.

    This uses QlogFileFactory::from_env to create a factory to write qlog traces into the directory set through the QLOGDIR environment variable.

    If QLOGDIR is not set, no traces will be written. If QLOGDIR is set to a path that does not exist, it will be created.

    The files will be prefixed with prefix.

    -

    pub fn qlog_from_path( +

    Source

    pub fn qlog_from_path( &mut self, path: impl AsRef<Path>, prefix: &str, ) -> &mut TransportConfig

    Configures qlog capturing into a directory.

    This uses QlogFileFactory to create a factory to write qlog traces into the specified directory. The files will be prefixed with prefix.

    -

    Trait Implementations§

    §

    impl Clone for TransportConfig

    §

    fn clone(&self) -> TransportConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for TransportConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for TransportConfig

    §

    fn default() -> TransportConfig

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for TransportConfig

    Source§

    fn clone(&self) -> TransportConfig

    Returns a duplicate 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 TransportConfig

    Source§

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

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

    impl Default for TransportConfig

    Source§

    fn default() -> TransportConfig

    Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/struct.TransportErrorCode.html b/pr/531/docs/noq/struct.TransportErrorCode.html index e6680a7bc..78952d263 100644 --- a/pr/531/docs/noq/struct.TransportErrorCode.html +++ b/pr/531/docs/noq/struct.TransportErrorCode.html @@ -1,30 +1,30 @@ -TransportErrorCode in noq - Rust

    TransportErrorCode

    Struct TransportErrorCode 

    pub struct TransportErrorCode(/* private fields */);
    Expand description

    Transport-level error code

    -

    Implementations§

    §

    impl Code

    pub fn crypto(code: u8) -> Code

    Create QUIC error code from TLS alert code

    -
    §

    impl Code

    pub const NO_ERROR: Code

    the connection is being closed abruptly in the absence of any error

    -

    pub const INTERNAL_ERROR: Code

    the endpoint encountered an internal error and cannot continue with the connection

    -

    pub const CONNECTION_REFUSED: Code

    the server refused to accept a new connection

    -

    pub const FLOW_CONTROL_ERROR: Code

    received more data than permitted in advertised data limits

    -

    pub const STREAM_LIMIT_ERROR: Code

    received a frame for a stream identifier that exceeded advertised the stream limit for the corresponding stream type

    -

    pub const STREAM_STATE_ERROR: Code

    received a frame for a stream that was not in a state that permitted that frame

    -

    pub const FINAL_SIZE_ERROR: Code

    received a STREAM frame or a RESET_STREAM frame containing a different final size to the one already established

    -

    pub const FRAME_ENCODING_ERROR: Code

    received a frame that was badly formatted

    -

    pub const TRANSPORT_PARAMETER_ERROR: Code

    received transport parameters that were badly formatted, included an invalid value, was absent even though it is mandatory, was present though it is forbidden, or is otherwise in error

    -

    pub const CONNECTION_ID_LIMIT_ERROR: Code

    the number of connection IDs provided by the peer exceeds the advertised active_connection_id_limit

    -

    pub const PROTOCOL_VIOLATION: Code

    detected an error with protocol compliance that was not covered by more specific error codes

    -

    pub const INVALID_TOKEN: Code

    received an invalid Retry Token in a client Initial

    -

    pub const APPLICATION_ERROR: Code

    the application or application protocol caused the connection to be closed during the handshake

    -

    pub const CRYPTO_BUFFER_EXCEEDED: Code

    received more data in CRYPTO frames than can be buffered

    -

    pub const KEY_UPDATE_ERROR: Code

    key update error

    -

    pub const AEAD_LIMIT_REACHED: Code

    the endpoint has reached the confidentiality or integrity limit for the AEAD algorithm

    -

    pub const NO_VIABLE_PATH: Code

    no viable network path exists

    -

    pub const APPLICATION_ABANDON_PATH: Code

    Path abandoned at the application’s request

    -

    pub const PATH_RESOURCE_LIMIT_REACHED: Code

    Path abandoned due to resource limitations in the transport

    -

    pub const PATH_UNSTABLE_OR_POOR: Code

    Path abandoned due to unstable interfaces

    -

    pub const NO_CID_AVAILABLE_FOR_PATH: Code

    Path abandoned due to no available connection IDs for the path

    -

    Trait Implementations§

    §

    impl Clone for Code

    §

    fn clone(&self) -> Code

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for Code

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Decodable for Code

    §

    fn decode<B>(buf: &mut B) -> Result<Code, UnexpectedEnd>
    where - B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    impl Display for Code

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Encodable for Code

    §

    fn encode<B>(&self, buf: &mut B)
    where - B: BufMut,

    Append the encoding of self to the provided buffer.
    §

    impl From<Code> for VarInt

    §

    fn from(value: Code) -> VarInt

    Converts to this type from the input type.
    §

    impl From<VarInt> for Code

    §

    fn from(value: VarInt) -> Code

    Converts to this type from the input type.
    §

    impl PartialEq for Code

    §

    fn eq(&self, other: &Code) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Copy for Code

    §

    impl Eq for Code

    §

    impl StructuralPartialEq for Code

    Auto Trait Implementations§

    §

    impl Freeze for Code

    §

    impl RefUnwindSafe for Code

    §

    impl Send for Code

    §

    impl Sync for Code

    §

    impl Unpin for Code

    §

    impl UnwindSafe for Code

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +TransportErrorCode in noq - Rust

    TransportErrorCode

    Struct TransportErrorCode 

    Source
    pub struct TransportErrorCode(/* private fields */);
    Expand description

    Transport-level error code

    +

    Implementations§

    Source§

    impl Code

    Source

    pub fn crypto(code: u8) -> Code

    Create QUIC error code from TLS alert code

    +
    Source§

    impl Code

    Source

    pub const NO_ERROR: Code

    the connection is being closed abruptly in the absence of any error

    +
    Source

    pub const INTERNAL_ERROR: Code

    the endpoint encountered an internal error and cannot continue with the connection

    +
    Source

    pub const CONNECTION_REFUSED: Code

    the server refused to accept a new connection

    +
    Source

    pub const FLOW_CONTROL_ERROR: Code

    received more data than permitted in advertised data limits

    +
    Source

    pub const STREAM_LIMIT_ERROR: Code

    received a frame for a stream identifier that exceeded advertised the stream limit for the corresponding stream type

    +
    Source

    pub const STREAM_STATE_ERROR: Code

    received a frame for a stream that was not in a state that permitted that frame

    +
    Source

    pub const FINAL_SIZE_ERROR: Code

    received a STREAM frame or a RESET_STREAM frame containing a different final size to the one already established

    +
    Source

    pub const FRAME_ENCODING_ERROR: Code

    received a frame that was badly formatted

    +
    Source

    pub const TRANSPORT_PARAMETER_ERROR: Code

    received transport parameters that were badly formatted, included an invalid value, was absent even though it is mandatory, was present though it is forbidden, or is otherwise in error

    +
    Source

    pub const CONNECTION_ID_LIMIT_ERROR: Code

    the number of connection IDs provided by the peer exceeds the advertised active_connection_id_limit

    +
    Source

    pub const PROTOCOL_VIOLATION: Code

    detected an error with protocol compliance that was not covered by more specific error codes

    +
    Source

    pub const INVALID_TOKEN: Code

    received an invalid Retry Token in a client Initial

    +
    Source

    pub const APPLICATION_ERROR: Code

    the application or application protocol caused the connection to be closed during the handshake

    +
    Source

    pub const CRYPTO_BUFFER_EXCEEDED: Code

    received more data in CRYPTO frames than can be buffered

    +
    Source

    pub const KEY_UPDATE_ERROR: Code

    key update error

    +
    Source

    pub const AEAD_LIMIT_REACHED: Code

    the endpoint has reached the confidentiality or integrity limit for the AEAD algorithm

    +
    Source

    pub const NO_VIABLE_PATH: Code

    no viable network path exists

    +
    Source

    pub const APPLICATION_ABANDON_PATH: Code

    Path abandoned at the application’s request

    +
    Source

    pub const PATH_RESOURCE_LIMIT_REACHED: Code

    Path abandoned due to resource limitations in the transport

    +
    Source

    pub const PATH_UNSTABLE_OR_POOR: Code

    Path abandoned due to unstable interfaces

    +
    Source

    pub const NO_CID_AVAILABLE_FOR_PATH: Code

    Path abandoned due to no available connection IDs for the path

    +

    Trait Implementations§

    Source§

    impl Clone for Code

    Source§

    fn clone(&self) -> Code

    Returns a duplicate 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 Code

    Source§

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

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

    impl Decodable for Code

    Source§

    fn decode<B>(buf: &mut B) -> Result<Code, UnexpectedEnd>
    where + B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    Source§

    impl Display for Code

    Source§

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

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

    impl Encodable for Code

    Source§

    fn encode<B>(&self, buf: &mut B)
    where + B: BufMut,

    Append the encoding of self to the provided buffer.
    Source§

    impl From<Code> for VarInt

    Source§

    fn from(value: Code) -> VarInt

    Converts to this type from the input type.
    Source§

    impl From<VarInt> for Code

    Source§

    fn from(value: VarInt) -> Code

    Converts to this type from the input type.
    Source§

    impl PartialEq for Code

    Source§

    fn eq(&self, other: &Code) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Copy for Code

    Source§

    impl Eq for Code

    Source§

    impl StructuralPartialEq for Code

    Auto Trait Implementations§

    §

    impl Freeze for Code

    §

    impl RefUnwindSafe for Code

    §

    impl Send for Code

    §

    impl Sync for Code

    §

    impl Unpin for Code

    §

    impl UnwindSafe for Code

    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 diff --git a/pr/531/docs/noq/struct.UdpStats.html b/pr/531/docs/noq/struct.UdpStats.html index 6673d56c0..0ae4b947e 100644 --- a/pr/531/docs/noq/struct.UdpStats.html +++ b/pr/531/docs/noq/struct.UdpStats.html @@ -1,4 +1,4 @@ -UdpStats in noq - Rust

    UdpStats

    Struct UdpStats 

    #[non_exhaustive]
    pub struct UdpStats { +UdpStats in noq - Rust

    UdpStats

    Struct UdpStats 

    Source
    #[non_exhaustive]
    pub struct UdpStats { pub datagrams: u64, pub bytes: u64, pub ios: u64, @@ -8,8 +8,8 @@
    §bytes: u64

    The total amount of bytes which have been transferred inside UDP datagrams

    §ios: u64

    The amount of I/O operations executed

    Can be less than datagrams when GSO, GRO, and/or batched system calls are in use.

    -

    Trait Implementations§

    §

    impl Clone for UdpStats

    §

    fn clone(&self) -> UdpStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for UdpStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for UdpStats

    §

    fn default() -> UdpStats

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

    impl PartialEq for UdpStats

    §

    fn eq(&self, other: &UdpStats) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Copy for UdpStats

    §

    impl Eq for UdpStats

    §

    impl StructuralPartialEq for UdpStats

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for UdpStats

    Source§

    fn clone(&self) -> UdpStats

    Returns a duplicate 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 UdpStats

    Source§

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

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

    impl Default for UdpStats

    Source§

    fn default() -> UdpStats

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

    impl PartialEq for UdpStats

    Source§

    fn eq(&self, other: &UdpStats) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Copy for UdpStats

    Source§

    impl Eq for UdpStats

    Source§

    impl StructuralPartialEq for UdpStats

    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 diff --git a/pr/531/docs/noq/struct.ValidationTokenConfig.html b/pr/531/docs/noq/struct.ValidationTokenConfig.html index 7282bf423..d9ef92094 100644 --- a/pr/531/docs/noq/struct.ValidationTokenConfig.html +++ b/pr/531/docs/noq/struct.ValidationTokenConfig.html @@ -1,4 +1,4 @@ -ValidationTokenConfig in noq - Rust

    ValidationTokenConfig

    Struct ValidationTokenConfig 

    pub struct ValidationTokenConfig { /* private fields */ }
    Expand description

    Configuration for sending and handling validation tokens in incoming connections

    +ValidationTokenConfig in noq - Rust

    ValidationTokenConfig

    Struct ValidationTokenConfig 

    Source
    pub struct ValidationTokenConfig { /* private fields */ }
    Expand description

    Configuration for sending and handling validation tokens in incoming connections

    Default values should be suitable for most internet applications.

    §QUIC Tokens

    The QUIC protocol defines a concept of “address validation”. Essentially, one side of a @@ -33,20 +33,20 @@ is the main situation where a server might be sending application data to an add be validated by token usage earlier than it would become validated without token usage.

    These tokens should not be confused with “stateless reset tokens,” which are similarly named but entirely unrelated.

    -

    Implementations§

    §

    impl ValidationTokenConfig

    pub fn lifetime(&mut self, value: Duration) -> &mut ValidationTokenConfig

    Duration after an address validation token was issued for which it’s considered valid

    +

    Implementations§

    Source§

    impl ValidationTokenConfig

    Source

    pub fn lifetime(&mut self, value: Duration) -> &mut ValidationTokenConfig

    Duration after an address validation token was issued for which it’s considered valid

    This refers only to tokens sent in NEW_TOKEN frames, in contrast to retry tokens.

    Defaults to 2 weeks.

    -

    pub fn log(&mut self, log: Arc<dyn TokenLog>) -> &mut ValidationTokenConfig

    Set a custom TokenLog

    +
    Source

    pub fn log(&mut self, log: Arc<dyn TokenLog>) -> &mut ValidationTokenConfig

    Set a custom TokenLog

    If the bloom feature is enabled (which it is by default), defaults to a default BloomTokenLog, which is suitable for most internet applications.

    If the bloom feature is disabled, defaults to NoneTokenLog, which makes the server ignore all address validation tokens (that is, tokens originating from NEW_TOKEN frames–retry tokens are not affected).

    -

    pub fn sent(&mut self, value: u32) -> &mut ValidationTokenConfig

    Number of address validation tokens sent to a client when its path is validated

    +
    Source

    pub fn sent(&mut self, value: u32) -> &mut ValidationTokenConfig

    Number of address validation tokens sent to a client when its path is validated

    This refers only to tokens sent in NEW_TOKEN frames, in contrast to retry tokens.

    If the bloom feature is enabled (which it is by default), defaults to 2. Otherwise, defaults to 0.

    -

    Trait Implementations§

    §

    impl Clone for ValidationTokenConfig

    §

    fn clone(&self) -> ValidationTokenConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ValidationTokenConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for ValidationTokenConfig

    §

    fn default() -> ValidationTokenConfig

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ValidationTokenConfig

    Source§

    fn clone(&self) -> ValidationTokenConfig

    Returns a duplicate 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 ValidationTokenConfig

    Source§

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

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

    impl Default for ValidationTokenConfig

    Source§

    fn default() -> ValidationTokenConfig

    Returns the “default value” for a type. 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 diff --git a/pr/531/docs/noq/struct.VarInt.html b/pr/531/docs/noq/struct.VarInt.html index 32f20eb1d..2aa2930e0 100644 --- a/pr/531/docs/noq/struct.VarInt.html +++ b/pr/531/docs/noq/struct.VarInt.html @@ -1,36 +1,36 @@ -VarInt in noq - Rust

    VarInt

    Struct VarInt 

    pub struct VarInt(/* private fields */);
    Expand description

    An integer less than 2^62

    +VarInt in noq - Rust

    VarInt

    Struct VarInt 

    Source
    pub struct VarInt(/* private fields */);
    Expand description

    An integer less than 2^62

    Values of this type are suitable for encoding as QUIC variable-length integer.

    -

    Implementations§

    §

    impl VarInt

    pub const MAX: VarInt

    The largest representable value

    -

    pub const MAX_SIZE: usize = 8usize

    The largest encoded value length

    -

    pub const fn from_u32(x: u32) -> VarInt

    Construct a VarInt infallibly

    -

    pub fn from_u64(x: u64) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    -

    pub const unsafe fn from_u64_unchecked(x: u64) -> VarInt

    Create a VarInt without ensuring it’s in range

    +

    Implementations§

    Source§

    impl VarInt

    Source

    pub const MAX: VarInt

    The largest representable value

    +
    Source

    pub const MAX_SIZE: usize = 8usize

    The largest encoded value length

    +
    Source

    pub const fn from_u32(x: u32) -> VarInt

    Construct a VarInt infallibly

    +
    Source

    pub fn from_u64(x: u64) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    +
    Source

    pub const unsafe fn from_u64_unchecked(x: u64) -> VarInt

    Create a VarInt without ensuring it’s in range

    §Safety

    x must be less than 2^62.

    -

    pub const fn into_inner(self) -> u64

    Extract the integer value

    -

    pub fn saturating_add(self, rhs: impl Into<VarInt>) -> VarInt

    Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead +

    Source

    pub const fn into_inner(self) -> u64

    Extract the integer value

    +
    Source

    pub fn saturating_add(self, rhs: impl Into<VarInt>) -> VarInt

    Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

    -

    Trait Implementations§

    §

    impl<'arbitrary> Arbitrary<'arbitrary> for VarInt

    §

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<VarInt, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    §

    fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

    Generate an arbitrary value of Self from the entirety of the given +

    Trait Implementations§

    Source§

    impl<'arbitrary> Arbitrary<'arbitrary> for VarInt

    Source§

    fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<VarInt, Error>

    Generate an arbitrary value of Self from the given unstructured data. Read more
    §

    fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

    Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
    §

    fn size_hint(depth: usize) -> (usize, Option<usize>)

    Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
    §

    fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

    Get a size hint for how many bytes out of an Unstructured this type -needs to construct itself. Read more
    §

    impl Clone for VarInt

    §

    fn clone(&self) -> VarInt

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for VarInt

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Decodable for VarInt

    §

    fn decode<B>(r: &mut B) -> Result<VarInt, UnexpectedEnd>
    where - B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    impl Default for VarInt

    §

    fn default() -> VarInt

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

    impl Display for VarInt

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Encodable for VarInt

    §

    fn encode<B>(&self, w: &mut B)
    where - B: BufMut,

    Append the encoding of self to the provided buffer.
    §

    impl From<StreamId> for VarInt

    §

    fn from(x: StreamId) -> VarInt

    Converts to this type from the input type.
    §

    impl From<Code> for VarInt

    §

    fn from(value: Code) -> VarInt

    Converts to this type from the input type.
    §

    impl From<VarInt> for IdleTimeout

    §

    fn from(inner: VarInt) -> IdleTimeout

    Converts to this type from the input type.
    §

    impl From<VarInt> for StreamId

    §

    fn from(v: VarInt) -> StreamId

    Converts to this type from the input type.
    §

    impl From<VarInt> for Code

    §

    fn from(value: VarInt) -> Code

    Converts to this type from the input type.
    §

    impl From<u16> for VarInt

    §

    fn from(x: u16) -> VarInt

    Converts to this type from the input type.
    §

    impl From<u32> for VarInt

    §

    fn from(x: u32) -> VarInt

    Converts to this type from the input type.
    §

    impl From<u8> for VarInt

    §

    fn from(x: u8) -> VarInt

    Converts to this type from the input type.
    §

    impl Hash for VarInt

    §

    fn hash<__H>(&self, state: &mut __H)
    where +needs to construct itself. Read more

    Source§

    impl Clone for VarInt

    Source§

    fn clone(&self) -> VarInt

    Returns a duplicate 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 VarInt

    Source§

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

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

    impl Decodable for VarInt

    Source§

    fn decode<B>(r: &mut B) -> Result<VarInt, UnexpectedEnd>
    where + B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    Source§

    impl Default for VarInt

    Source§

    fn default() -> VarInt

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

    impl Display for VarInt

    Source§

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

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

    impl Encodable for VarInt

    Source§

    fn encode<B>(&self, w: &mut B)
    where + B: BufMut,

    Append the encoding of self to the provided buffer.
    Source§

    impl From<StreamId> for VarInt

    Source§

    fn from(x: StreamId) -> VarInt

    Converts to this type from the input type.
    Source§

    impl From<Code> for VarInt

    Source§

    fn from(value: Code) -> VarInt

    Converts to this type from the input type.
    Source§

    impl From<VarInt> for IdleTimeout

    Source§

    fn from(inner: VarInt) -> IdleTimeout

    Converts to this type from the input type.
    Source§

    impl From<VarInt> for StreamId

    Source§

    fn from(v: VarInt) -> StreamId

    Converts to this type from the input type.
    Source§

    impl From<VarInt> for Code

    Source§

    fn from(value: VarInt) -> Code

    Converts to this type from the input type.
    Source§

    impl From<u16> for VarInt

    Source§

    fn from(x: u16) -> VarInt

    Converts to this type from the input type.
    Source§

    impl From<u32> for VarInt

    Source§

    fn from(x: u32) -> VarInt

    Converts to this type from the input type.
    Source§

    impl From<u8> for VarInt

    Source§

    fn from(x: u8) -> VarInt

    Converts to this type from the input type.
    Source§

    impl Hash for VarInt

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for VarInt

    §

    fn cmp(&self, other: &VarInt) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for VarInt

    Source§

    fn cmp(&self, other: &VarInt) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for VarInt

    §

    fn eq(&self, other: &VarInt) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl PartialOrd for VarInt

    §

    fn partial_cmp(&self, other: &VarInt) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for VarInt

    Source§

    fn eq(&self, other: &VarInt) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl PartialOrd for VarInt

    Source§

    fn partial_cmp(&self, other: &VarInt) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the <= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    §

    impl TryFrom<u128> for VarInt

    §

    fn try_from(x: u128) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    -
    §

    type Error = VarIntBoundsExceeded

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

    impl TryFrom<u64> for VarInt

    §

    fn try_from(x: u64) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    -
    §

    type Error = VarIntBoundsExceeded

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

    impl TryFrom<usize> for VarInt

    §

    fn try_from(x: usize) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    -
    §

    type Error = VarIntBoundsExceeded

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

    impl Copy for VarInt

    §

    impl Eq for VarInt

    §

    impl StructuralPartialEq for VarInt

    Auto Trait Implementations§

    §

    impl Freeze for VarInt

    §

    impl RefUnwindSafe for VarInt

    §

    impl Send for VarInt

    §

    impl Sync for VarInt

    §

    impl Unpin for VarInt

    §

    impl UnwindSafe for VarInt

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +the >= operator. Read more

    Source§

    impl TryFrom<u128> for VarInt

    Source§

    fn try_from(x: u128) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    +
    Source§

    type Error = VarIntBoundsExceeded

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

    impl TryFrom<u64> for VarInt

    Source§

    fn try_from(x: u64) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    +
    Source§

    type Error = VarIntBoundsExceeded

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

    impl TryFrom<usize> for VarInt

    Source§

    fn try_from(x: usize) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    +
    Source§

    type Error = VarIntBoundsExceeded

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

    impl Copy for VarInt

    Source§

    impl Eq for VarInt

    Source§

    impl StructuralPartialEq for VarInt

    Auto Trait Implementations§

    §

    impl Freeze for VarInt

    §

    impl RefUnwindSafe for VarInt

    §

    impl Send for VarInt

    §

    impl Sync for VarInt

    §

    impl Unpin for VarInt

    §

    impl UnwindSafe for VarInt

    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 diff --git a/pr/531/docs/noq/struct.VarIntBoundsExceeded.html b/pr/531/docs/noq/struct.VarIntBoundsExceeded.html index e1da14235..dffcca1f8 100644 --- a/pr/531/docs/noq/struct.VarIntBoundsExceeded.html +++ b/pr/531/docs/noq/struct.VarIntBoundsExceeded.html @@ -1,6 +1,6 @@ -VarIntBoundsExceeded in noq - Rust

    VarIntBoundsExceeded

    Struct VarIntBoundsExceeded 

    pub struct VarIntBoundsExceeded;
    Expand description

    Error returned when constructing a VarInt from a value >= 2^62

    -

    Trait Implementations§

    §

    impl Clone for VarIntBoundsExceeded

    §

    fn clone(&self) -> VarIntBoundsExceeded

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for VarIntBoundsExceeded

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for VarIntBoundsExceeded

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for VarIntBoundsExceeded

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    §

    impl From<VarIntBoundsExceeded> for ConfigError

    §

    fn from(_: VarIntBoundsExceeded) -> ConfigError

    Converts to this type from the input type.
    §

    impl PartialEq for VarIntBoundsExceeded

    §

    fn eq(&self, other: &VarIntBoundsExceeded) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Copy for VarIntBoundsExceeded

    §

    impl Eq for VarIntBoundsExceeded

    §

    impl StructuralPartialEq for VarIntBoundsExceeded

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +VarIntBoundsExceeded in noq - Rust

    VarIntBoundsExceeded

    Struct VarIntBoundsExceeded 

    Source
    pub struct VarIntBoundsExceeded;
    Expand description

    Error returned when constructing a VarInt from a value >= 2^62

    +

    Trait Implementations§

    Source§

    impl Clone for VarIntBoundsExceeded

    Source§

    fn clone(&self) -> VarIntBoundsExceeded

    Returns a duplicate 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 VarIntBoundsExceeded

    Source§

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

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

    impl Display for VarIntBoundsExceeded

    Source§

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

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

    impl Error for VarIntBoundsExceeded

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<VarIntBoundsExceeded> for ConfigError

    Source§

    fn from(_: VarIntBoundsExceeded) -> ConfigError

    Converts to this type from the input type.
    Source§

    impl PartialEq for VarIntBoundsExceeded

    Source§

    fn eq(&self, other: &VarIntBoundsExceeded) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Copy for VarIntBoundsExceeded

    Source§

    impl Eq for VarIntBoundsExceeded

    Source§

    impl StructuralPartialEq for VarIntBoundsExceeded

    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 diff --git a/pr/531/docs/noq/struct.Written.html b/pr/531/docs/noq/struct.Written.html index 378fab745..7109bfe1f 100644 --- a/pr/531/docs/noq/struct.Written.html +++ b/pr/531/docs/noq/struct.Written.html @@ -1,12 +1,12 @@ -Written in noq - Rust

    Written

    Struct Written 

    pub struct Written {
    +Written in noq - Rust

    Written

    Struct Written 

    Source
    pub struct Written {
         pub bytes: usize,
         pub chunks: usize,
     }
    Expand description

    Indicates how many bytes and chunks had been transferred in a write operation

    Fields§

    §bytes: usize

    The amount of bytes which had been written

    §chunks: usize

    The amount of full chunks which had been written

    If a chunk was only partially written, it will not be counted by this field.

    -

    Trait Implementations§

    §

    impl Clone for Written

    §

    fn clone(&self) -> Written

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for Written

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for Written

    §

    fn default() -> Written

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

    impl PartialEq for Written

    §

    fn eq(&self, other: &Written) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    §

    impl Copy for Written

    §

    impl Eq for Written

    §

    impl StructuralPartialEq for Written

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for Written

    Source§

    fn clone(&self) -> Written

    Returns a duplicate 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 Written

    Source§

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

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

    impl Default for Written

    Source§

    fn default() -> Written

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

    impl PartialEq for Written

    Source§

    fn eq(&self, other: &Written) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Copy for Written

    Source§

    impl Eq for Written

    Source§

    impl StructuralPartialEq for Written

    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 diff --git a/pr/531/docs/noq/trait.ConnectionIdGenerator.html b/pr/531/docs/noq/trait.ConnectionIdGenerator.html index 6dfcaec63..04eb50827 100644 --- a/pr/531/docs/noq/trait.ConnectionIdGenerator.html +++ b/pr/531/docs/noq/trait.ConnectionIdGenerator.html @@ -1,4 +1,4 @@ -ConnectionIdGenerator in noq - Rust

    ConnectionIdGenerator

    Trait ConnectionIdGenerator 

    pub trait ConnectionIdGenerator: Send + Sync {
    +ConnectionIdGenerator in noq - Rust

    ConnectionIdGenerator

    Trait ConnectionIdGenerator 

    Source
    pub trait ConnectionIdGenerator: Send + Sync {
         // Required methods
         fn generate_cid(&mut self) -> ConnectionId;
         fn cid_len(&self) -> usize;
    @@ -7,15 +7,15 @@
         // Provided method
         fn validate(&self, _cid: ConnectionId) -> Result<(), InvalidCid> { ... }
     }
    Expand description

    Generates connection IDs for incoming connections

    -

    Required Methods§

    fn generate_cid(&mut self) -> ConnectionId

    Generates a new CID

    +

    Required Methods§

    Source

    fn generate_cid(&mut self) -> ConnectionId

    Generates a new CID

    Connection IDs MUST NOT contain any information that can be used by an external observer (that is, one that does not cooperate with the issuer) to correlate them with other connection IDs for the same connection. They MUST have high entropy, e.g. due to encrypted data or cryptographic-grade random data.

    -

    fn cid_len(&self) -> usize

    Returns the length of a CID for connections created by this generator

    -

    fn cid_lifetime(&self) -> Option<Duration>

    Returns the lifetime of generated Connection IDs

    +
    Source

    fn cid_len(&self) -> usize

    Returns the length of a CID for connections created by this generator

    +
    Source

    fn cid_lifetime(&self) -> Option<Duration>

    Returns the lifetime of generated Connection IDs

    Connection IDs will be retired after the returned Duration, if any. Assumed to be constant.

    -

    Provided Methods§

    fn validate(&self, _cid: ConnectionId) -> Result<(), InvalidCid>

    Quickly determine whether cid could have been generated by this generator

    +

    Provided Methods§

    Source

    fn validate(&self, _cid: ConnectionId) -> Result<(), InvalidCid>

    Quickly determine whether cid could have been generated by this generator

    False positives are permitted, but increase the cost of handling invalid packets.

    -

    Implementors§

    §

    impl ConnectionIdGenerator for HashedConnectionIdGenerator

    §

    impl ConnectionIdGenerator for RandomConnectionIdGenerator

    \ No newline at end of file +

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/trait.NetworkChangeHint.html b/pr/531/docs/noq/trait.NetworkChangeHint.html index 2bb5057cb..41fce6574 100644 --- a/pr/531/docs/noq/trait.NetworkChangeHint.html +++ b/pr/531/docs/noq/trait.NetworkChangeHint.html @@ -1,12 +1,12 @@ -NetworkChangeHint in noq - Rust

    NetworkChangeHint

    Trait NetworkChangeHint 

    pub trait NetworkChangeHint: Debug + 'static {
    +NetworkChangeHint in noq - Rust

    NetworkChangeHint

    Trait NetworkChangeHint 

    Source
    pub trait NetworkChangeHint: Debug + 'static {
         // Required method
         fn is_path_recoverable(
             &self,
             path_id: PathId,
    -        network_path: FourTuple,
    +        network_path: FourTuple,
         ) -> bool;
     }
    Expand description

    Hints when the caller identifies a network change.

    -

    Required Methods§

    fn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool

    Inform the connection if a path may recover after a network change.

    +

    Required Methods§

    Source

    fn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool

    Inform the connection if a path may recover after a network change.

    After network changes, paths may not be recoverable. In this case, waiting for the path to become idle may take longer than what is desirable. If Self::is_path_recoverable returns false, a multipath-enabled, client-side connection will establish a new path to diff --git a/pr/531/docs/noq/trait.QlogFactory.html b/pr/531/docs/noq/trait.QlogFactory.html index 052bab12a..ac57dec70 100644 --- a/pr/531/docs/noq/trait.QlogFactory.html +++ b/pr/531/docs/noq/trait.QlogFactory.html @@ -1,4 +1,4 @@ -QlogFactory in noq - Rust

    QlogFactory

    Trait QlogFactory 

    pub trait QlogFactory:
    +QlogFactory in noq - Rust

    QlogFactory

    Trait QlogFactory 

    Source
    pub trait QlogFactory:
         Send
         + Sync
         + 'static {
    @@ -12,7 +12,7 @@
         ) -> Option<QlogConfig>;
     }
    Expand description

    Constructs a QlogConfig for individual connections.

    This is set via TransportConfig::qlog_factory.

    -

    Required Methods§

    Required Methods§

    Source

    fn for_connection( &self, side: Side, remote: SocketAddr, @@ -20,4 +20,4 @@ now: Instant, ) -> Option<QlogConfig>

    Returns a QlogConfig for a connection, if logging should be enabled.

    If None is returned, qlog capture is disabled for the connection.

    -

    Implementors§

    \ No newline at end of file +

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/trait.TimeSource.html b/pr/531/docs/noq/trait.TimeSource.html index e8d89af23..2869c06bb 100644 --- a/pr/531/docs/noq/trait.TimeSource.html +++ b/pr/531/docs/noq/trait.TimeSource.html @@ -1,7 +1,7 @@ -TimeSource in noq - Rust

    TimeSource

    Trait TimeSource 

    pub trait TimeSource: Send + Sync {
    +TimeSource in noq - Rust

    TimeSource

    Trait TimeSource 

    Source
    pub trait TimeSource: Send + Sync {
         // Required method
         fn now(&self) -> SystemTime;
     }
    Expand description

    Object to get current SystemTime

    This exists to allow system time to be mocked in tests, or wherever else desired.

    -

    Required Methods§

    fn now(&self) -> SystemTime

    Get SystemTime::now() or the mocked equivalent

    -

    Implementors§

    \ No newline at end of file +

    Required Methods§

    Source

    fn now(&self) -> SystemTime

    Get SystemTime::now() or the mocked equivalent

    +

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/trait.TokenLog.html b/pr/531/docs/noq/trait.TokenLog.html index 8073434f1..60db43f8c 100644 --- a/pr/531/docs/noq/trait.TokenLog.html +++ b/pr/531/docs/noq/trait.TokenLog.html @@ -1,4 +1,4 @@ -TokenLog in noq - Rust

    TokenLog

    Trait TokenLog 

    pub trait TokenLog: Send + Sync {
    +TokenLog in noq - Rust

    TokenLog

    Trait TokenLog 

    Source
    pub trait TokenLog: Send + Sync {
         // Required method
         fn check_and_insert(
             &self,
    @@ -18,7 +18,7 @@ Servers are encouraged to allow tokens to be used only once, if possible; tokens
     additional information about clients to further narrow applicability or reuse.

    TokenLog pertains only to tokens provided in NEW_TOKEN frames.

    -

    Required Methods§

    Required Methods§

    Source

    fn check_and_insert( &self, nonce: u128, issued: SystemTime, @@ -42,4 +42,4 @@ attacks. The QUIC specification requires that this be limited, if not preven vulnerability; it is permissible for a TokenLog to always return Err. A false positive causes the token to be ignored, which may cause the transmission of some 0.5-RTT data to be delayed until the handshake completes, if a sufficient amount of 0.5-RTT data it sent.

    -

    Implementors§

    \ No newline at end of file +

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq/trait.TokenStore.html b/pr/531/docs/noq/trait.TokenStore.html index f3b2e02f1..aff114b1b 100644 --- a/pr/531/docs/noq/trait.TokenStore.html +++ b/pr/531/docs/noq/trait.TokenStore.html @@ -1,13 +1,13 @@ -TokenStore in noq - Rust

    TokenStore

    Trait TokenStore 

    pub trait TokenStore: Send + Sync {
    +TokenStore in noq - Rust

    TokenStore

    Trait TokenStore 

    Source
    pub trait TokenStore: Send + Sync {
         // Required methods
         fn insert(&self, server_name: &str, token: Bytes);
         fn take(&self, server_name: &str) -> Option<Bytes>;
     }
    Expand description

    Responsible for storing validation tokens received from servers and retrieving them for use in subsequent connections

    -

    Required Methods§

    fn insert(&self, server_name: &str, token: Bytes)

    Potentially store a token for later one-time use

    +

    Required Methods§

    Source

    fn insert(&self, server_name: &str, token: Bytes)

    Potentially store a token for later one-time use

    Called when a NEW_TOKEN frame is received from the server.

    -

    fn take(&self, server_name: &str) -> Option<Bytes>

    Try to find and take a token that was stored with the given server name

    +
    Source

    fn take(&self, server_name: &str) -> Option<Bytes>

    Try to find and take a token that was stored with the given server name

    The same token must never be returned from take twice, as doing so can be used to de-anonymize a client’s traffic.

    Called when trying to connect to a server. It is always ok for this to return None.

    -

    Implementors§

    \ No newline at end of file +

    Implementors§

    \ No newline at end of file diff --git a/pr/531/docs/noq_proto/enum.ClosePathError.html b/pr/531/docs/noq_proto/enum.ClosePathError.html index cbe16cc4a..8e19a90ba 100644 --- a/pr/531/docs/noq_proto/enum.ClosePathError.html +++ b/pr/531/docs/noq_proto/enum.ClosePathError.html @@ -1,4 +1,4 @@ -ClosePathError in noq_proto - Rust

    ClosePathError

    Enum ClosePathError 

    Source
    pub enum ClosePathError {
    +ClosePathError in noq_proto - Rust

    ClosePathError

    Enum ClosePathError 

    Source
    pub enum ClosePathError {
         MultipathNotNegotiated,
         ClosedPath,
         LastOpenPath,
    @@ -6,8 +6,8 @@
     

    Variants§

    §

    MultipathNotNegotiated

    Multipath is not negotiated

    §

    ClosedPath

    The path is already closed or was never opened

    §

    LastOpenPath

    This is the last path, which can not be abandoned

    -

    Trait Implementations§

    Source§

    impl Clone for ClosePathError

    Source§

    fn clone(&self) -> ClosePathError

    Returns a duplicate 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 ClosePathError

    Source§

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

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

    impl Display for ClosePathError

    Source§

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

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

    impl Error for ClosePathError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl PartialEq for ClosePathError

    Source§

    fn eq(&self, other: &ClosePathError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    Source§

    impl Eq for ClosePathError

    Source§

    impl StructuralPartialEq for ClosePathError

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ClosePathError

    Source§

    fn clone(&self) -> ClosePathError

    Returns a duplicate 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 ClosePathError

    Source§

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

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

    impl Display for ClosePathError

    Source§

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

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

    impl Error for ClosePathError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl PartialEq for ClosePathError

    Source§

    fn eq(&self, other: &ClosePathError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ClosePathError

    Source§

    impl StructuralPartialEq for ClosePathError

    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 diff --git a/pr/531/docs/noq_proto/enum.ConnectionError.html b/pr/531/docs/noq_proto/enum.ConnectionError.html index 9c1b267fe..b80b7fc6a 100644 --- a/pr/531/docs/noq_proto/enum.ConnectionError.html +++ b/pr/531/docs/noq_proto/enum.ConnectionError.html @@ -1,4 +1,4 @@ -ConnectionError in noq_proto - Rust

    ConnectionError

    Enum ConnectionError 

    Source
    pub enum ConnectionError {
    +ConnectionError in noq_proto - Rust

    ConnectionError

    Enum ConnectionError 

    Source
    pub enum ConnectionError {
         VersionMismatch,
         TransportError(TransportError),
         ConnectionClosed(ConnectionClose),
    @@ -20,8 +20,8 @@ and §

    LocallyClosed

    The local application closed the connection

    §

    CidsExhausted

    The connection could not be created because not enough of the CID space is available

    Try using longer connection IDs.

    -

    Trait Implementations§

    Source§

    impl Clone for ConnectionError

    Source§

    fn clone(&self) -> ConnectionError

    Returns a duplicate 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 ConnectionError

    Source§

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

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

    impl Display for ConnectionError

    Source§

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

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

    impl Error for ConnectionError

    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<ConnectionError> for Error

    Source§

    fn from(x: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectionError

    Source§

    fn from(source: TransportError) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for ConnectionError

    Source§

    fn eq(&self, other: &ConnectionError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    Source§

    impl Eq for ConnectionError

    Source§

    impl StructuralPartialEq for ConnectionError

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ConnectionError

    Source§

    fn clone(&self) -> ConnectionError

    Returns a duplicate 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 ConnectionError

    Source§

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

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

    impl Display for ConnectionError

    Source§

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

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

    impl Error for ConnectionError

    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<ConnectionError> for Error

    Source§

    fn from(x: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectionError

    Source§

    fn from(source: TransportError) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for ConnectionError

    Source§

    fn eq(&self, other: &ConnectionError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Eq for ConnectionError

    Source§

    impl StructuralPartialEq for ConnectionError

    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 diff --git a/pr/531/docs/noq_proto/enum.Event.html b/pr/531/docs/noq_proto/enum.Event.html index 8055e6755..9c3bce221 100644 --- a/pr/531/docs/noq_proto/enum.Event.html +++ b/pr/531/docs/noq_proto/enum.Event.html @@ -1,4 +1,4 @@ -Event in noq_proto - Rust

    Event

    Enum Event 

    Source
    pub enum Event {
    +Event in noq_proto - Rust

    Event

    Enum Event 

    Source
    pub enum Event {
         HandshakeDataReady,
         Connected,
         HandshakeConfirmed,
    @@ -22,7 +22,7 @@
     
    §

    DatagramsUnblocked

    One or more application datagrams have been sent after blocking

    §

    Path(PathEvent)

    (Multi)Path events

    §

    NatTraversal(Event)

    n0’s nat traversal events

    -

    Trait Implementations§

    Source§

    impl Debug for Event

    Source§

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

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

    impl From<PathEvent> for Event

    Source§

    fn from(source: PathEvent) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl !Freeze for Event

    §

    impl !RefUnwindSafe for Event

    §

    impl Send for Event

    §

    impl Sync for Event

    §

    impl Unpin for Event

    §

    impl !UnwindSafe for Event

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Event

    Source§

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

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

    impl From<PathEvent> for Event

    Source§

    fn from(source: PathEvent) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    §

    impl !Freeze for Event

    §

    impl !RefUnwindSafe for Event

    §

    impl Send for Event

    §

    impl Sync for Event

    §

    impl Unpin for Event

    §

    impl !UnwindSafe for Event

    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.

    diff --git a/pr/531/docs/noq_proto/enum.PathError.html b/pr/531/docs/noq_proto/enum.PathError.html index f460f9da9..f1962d514 100644 --- a/pr/531/docs/noq_proto/enum.PathError.html +++ b/pr/531/docs/noq_proto/enum.PathError.html @@ -1,4 +1,4 @@ -PathError in noq_proto - Rust

    PathError

    Enum PathError 

    Source
    pub enum PathError {
    +PathError in noq_proto - Rust

    PathError

    Enum PathError 

    Source
    pub enum PathError {
         MultipathNotNegotiated,
         ServerSideNotAllowed,
         MaxPathIdReached,
    @@ -12,8 +12,8 @@
     
    §

    RemoteCidsExhausted

    No remote CIDs available to open a new path

    §

    ValidationFailed

    Path could not be validated and will be abandoned

    §

    InvalidRemoteAddress(SocketAddr)

    The remote address for the path is not supported by the endpoint

    -

    Trait Implementations§

    Source§

    impl Clone for PathError

    Source§

    fn clone(&self) -> PathError

    Returns a duplicate 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 PathError

    Source§

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

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

    impl Display for PathError

    Source§

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

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

    impl Error for PathError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl PartialEq for PathError

    Source§

    fn eq(&self, other: &PathError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
    Source§

    impl Copy for PathError

    Source§

    impl Eq for PathError

    Source§

    impl StructuralPartialEq for PathError

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for PathError

    Source§

    fn clone(&self) -> PathError

    Returns a duplicate 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 PathError

    Source§

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

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

    impl Display for PathError

    Source§

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

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

    impl Error for PathError

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl PartialEq for PathError

    Source§

    fn eq(&self, other: &PathError) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
    Source§

    impl Copy for PathError

    Source§

    impl Eq for PathError

    Source§

    impl StructuralPartialEq for PathError

    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 diff --git a/pr/531/docs/noq_proto/enum.PathEvent.html b/pr/531/docs/noq_proto/enum.PathEvent.html index afac19126..879c476cd 100644 --- a/pr/531/docs/noq_proto/enum.PathEvent.html +++ b/pr/531/docs/noq_proto/enum.PathEvent.html @@ -39,7 +39,7 @@ changes the status.

    Fields

    §id: PathId

    Path over which the observed address was reported, PathId::ZERO when multipath is not negotiated

    §addr: SocketAddr

    The address observed by the remote over this path

    -

    Trait Implementations§

    Source§

    impl Clone for PathEvent

    Source§

    fn clone(&self) -> PathEvent

    Returns a duplicate 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 PathEvent

    Source§

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

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

    impl From<PathEvent> for Event

    Source§

    fn from(source: PathEvent) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for PathEvent

    Source§

    fn eq(&self, other: &PathEvent) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +

    Trait Implementations§

    Source§

    impl Clone for PathEvent

    Source§

    fn clone(&self) -> PathEvent

    Returns a duplicate 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 PathEvent

    Source§

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

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

    impl From<PathEvent> for Event

    Source§

    fn from(source: PathEvent) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for PathEvent

    Source§

    fn eq(&self, other: &PathEvent) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
    Source§

    impl Eq for PathEvent

    Source§

    impl StructuralPartialEq for PathEvent

    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 diff --git a/pr/531/docs/noq_proto/struct.Connection.html b/pr/531/docs/noq_proto/struct.Connection.html index 4ad0e8b10..f8688fc2e 100644 --- a/pr/531/docs/noq_proto/struct.Connection.html +++ b/pr/531/docs/noq_proto/struct.Connection.html @@ -33,7 +33,7 @@ increasing time. Specifically, calling Instant may be interleaved in any order with a call to handle_event at that same instant; however events or timeouts with different instants must not be interleaved.

    -

    Implementations§

    Source§

    impl Connection

    Source

    pub fn poll_timeout(&mut self) -> Option<Instant>

    Returns the next time at which handle_timeout should be called

    +

    Implementations§

    Source§

    impl Connection

    Source

    pub fn poll_timeout(&mut self) -> Option<Instant>

    Returns the next time at which handle_timeout should be called

    The value returned may change after:

    • the application performed some I/O on the connection
    • @@ -228,7 +228,7 @@ available paths

    Source

    pub fn get_remote_nat_traversal_addresses( &self, ) -> Result<Vec<SocketAddr>, Error>

    Get the currently advertised nat traversal addresses by the server

    -
    Source

    pub fn initiate_nat_traversal_round( +

    Source

    pub fn initiate_nat_traversal_round( &mut self, now: Instant, ) -> Result<Vec<SocketAddr>, Error>

    Initiates a new nat traversal round

    @@ -238,7 +238,7 @@ initiated, the previous one is cancelled, and paths that have not been opened ar

    Returns the server addresses that are now being probed. If addresses fail due to spurious errors, these might succeed later and not be returned in this set.

    -

    Trait Implementations§

    Source§

    impl Debug for Connection

    Source§

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Connection

    Source§

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

    Formats the value using the given formatter. 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> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    diff --git a/pr/531/docs/noq_proto/struct.MultipathNotNegotiated.html b/pr/531/docs/noq_proto/struct.MultipathNotNegotiated.html index c11234865..e1af38708 100644 --- a/pr/531/docs/noq_proto/struct.MultipathNotNegotiated.html +++ b/pr/531/docs/noq_proto/struct.MultipathNotNegotiated.html @@ -1,5 +1,5 @@ -MultipathNotNegotiated in noq_proto - Rust

    MultipathNotNegotiated

    Struct MultipathNotNegotiated 

    Source
    pub struct MultipathNotNegotiated { /* private fields */ }
    Expand description

    Error when the multipath extension was not negotiated, but attempted to be used.

    -

    Trait Implementations§

    Source§

    impl Clone for MultipathNotNegotiated

    Source§

    fn clone(&self) -> MultipathNotNegotiated

    Returns a duplicate 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 MultipathNotNegotiated

    Source§

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

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

    impl Display for MultipathNotNegotiated

    Source§

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

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

    impl Error for MultipathNotNegotiated

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl Copy for MultipathNotNegotiated

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +MultipathNotNegotiated in noq_proto - Rust

    MultipathNotNegotiated

    Struct MultipathNotNegotiated 

    Source
    pub struct MultipathNotNegotiated { /* private fields */ }
    Expand description

    Error when the multipath extension was not negotiated, but attempted to be used.

    +

    Trait Implementations§

    Source§

    impl Clone for MultipathNotNegotiated

    Source§

    fn clone(&self) -> MultipathNotNegotiated

    Returns a duplicate 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 MultipathNotNegotiated

    Source§

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

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

    impl Display for MultipathNotNegotiated

    Source§

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

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

    impl Error for MultipathNotNegotiated

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl Copy for MultipathNotNegotiated

    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 diff --git a/pr/531/docs/noq_proto/struct.TransportError.html b/pr/531/docs/noq_proto/struct.TransportError.html index 56201dc3c..b717ebbd5 100644 --- a/pr/531/docs/noq_proto/struct.TransportError.html +++ b/pr/531/docs/noq_proto/struct.TransportError.html @@ -11,7 +11,7 @@
    §reason: String

    Human-readable explanation of the reason

    §crypto: Option<Arc<dyn Error + Send + Sync>>

    An underlying crypto (e.g. TLS) layer error

    Implementations§

    Source§

    impl Error

    Source

    pub fn new(code: Code, reason: String) -> Self

    Construct an error with a code and a reason

    -

    Trait Implementations§

    Source§

    impl Clone for Error

    Source§

    fn clone(&self) -> Error

    Returns a duplicate 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 Error

    Source§

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

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

    impl Display for Error

    Source§

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

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

    impl Error for Error

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<Error> for ConnectionClose

    Source§

    fn from(x: TransportError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectionError

    Source§

    fn from(source: TransportError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for TransportError

    Source§

    fn from(e: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for Error

    Source§

    fn eq(&self, other: &Self) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +

    Trait Implementations§

    Source§

    impl Clone for Error

    Source§

    fn clone(&self) -> Error

    Returns a duplicate 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 Error

    Source§

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

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

    impl Display for Error

    Source§

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

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

    impl Error for Error

    1.30.0 · Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    Source§

    impl From<Error> for ConnectionClose

    Source§

    fn from(x: TransportError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectionError

    Source§

    fn from(source: TransportError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for TransportError

    Source§

    fn from(e: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for Error

    Source§

    fn eq(&self, other: &Self) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
    Source§

    impl Eq for Error

    Auto Trait Implementations§

    §

    impl Freeze for Error

    §

    impl !RefUnwindSafe for Error

    §

    impl Send for Error

    §

    impl Sync for Error

    §

    impl Unpin for Error

    §

    impl !UnwindSafe for Error

    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 diff --git a/pr/531/docs/noq_proto/trait.NetworkChangeHint.html b/pr/531/docs/noq_proto/trait.NetworkChangeHint.html index 0c4566b48..de18cf867 100644 --- a/pr/531/docs/noq_proto/trait.NetworkChangeHint.html +++ b/pr/531/docs/noq_proto/trait.NetworkChangeHint.html @@ -1,4 +1,4 @@ -NetworkChangeHint in noq_proto - Rust

    NetworkChangeHint

    Trait NetworkChangeHint 

    Source
    pub trait NetworkChangeHint: Debug + 'static {
    +NetworkChangeHint in noq_proto - Rust

    NetworkChangeHint

    Trait NetworkChangeHint 

    Source
    pub trait NetworkChangeHint: Debug + 'static {
         // Required method
         fn is_path_recoverable(
             &self,
    @@ -6,7 +6,7 @@
             network_path: FourTuple,
         ) -> bool;
     }
    Expand description

    Hints when the caller identifies a network change.

    -

    Required Methods§

    Source

    fn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool

    Inform the connection if a path may recover after a network change.

    +

    Required Methods§

    Source

    fn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool

    Inform the connection if a path may recover after a network change.

    After network changes, paths may not be recoverable. In this case, waiting for the path to become idle may take longer than what is desirable. If Self::is_path_recoverable returns false, a multipath-enabled, client-side connection will establish a new path to diff --git a/pr/531/docs/settings.html b/pr/531/docs/settings.html index 1adf3f67d..fc24471ee 100644 --- a/pr/531/docs/settings.html +++ b/pr/531/docs/settings.html @@ -1 +1 @@ -Settings

    All

    Rustdoc settings

    Back
    \ No newline at end of file +Settings

    All

    Rustdoc settings

    Back
    \ No newline at end of file diff --git a/pr/531/docs/src/noq_proto/connection/mod.rs.html b/pr/531/docs/src/noq_proto/connection/mod.rs.html index e979bf5bd..4880f1105 100644 --- a/pr/531/docs/src/noq_proto/connection/mod.rs.html +++ b/pr/531/docs/src/noq_proto/connection/mod.rs.html @@ -6742,670 +6742,672 @@ 6742 Ok((path_id, path_was_known)) => { 6743 if path_was_known { 6744 trace!(%path_id, %remote, "nat traversal: path existed for remote, revalidating"); -6745 if let Some(path) = self.paths.get_mut(&path_id) { -6746 path.data.pending_on_path_challenge = true; -6747 } -6748 } -6749 Ok(Some((path_id, remote))) -6750 } -6751 Err(e) => { -6752 debug!(%remote, %e, "nat traversal: failed to probe remote"); -6753 Err(e) -6754 } -6755 } -6756 } -6757 -6758 /// Initiates a new nat traversal round -6759 /// -6760 /// A nat traversal round involves advertising the client's local addresses in `REACH_OUT` -6761 /// frames, and initiating probing of the known remote addresses. When a new round is -6762 /// initiated, the previous one is cancelled, and paths that have not been opened are closed. -6763 /// -6764 /// Returns the server addresses that are now being probed. -6765 /// If addresses fail due to spurious errors, these might succeed later and not be returned in -6766 /// this set. -6767 pub fn initiate_nat_traversal_round( -6768 &mut self, -6769 now: Instant, -6770 ) -> Result<Vec<SocketAddr>, n0_nat_traversal::Error> { -6771 if self.state.is_closed() { -6772 return Err(n0_nat_traversal::Error::Closed); -6773 } -6774 -6775 let ipv6 = self.is_ipv6(); -6776 let client_state = self.n0_nat_traversal.client_side_mut()?; -6777 let n0_nat_traversal::NatTraversalRound { -6778 new_round, -6779 reach_out_at, -6780 addresses_to_probe, -6781 prev_round_path_ids, -6782 } = client_state.initiate_nat_traversal_round(ipv6)?; -6783 -6784 trace!(%new_round, reach_out=reach_out_at.len(), to_probe=addresses_to_probe.len(), -6785 "initiating nat traversal round"); -6786 -6787 self.spaces[SpaceId::Data].pending.reach_out = Some((new_round, reach_out_at)); +6745 if let Some(pn_space) = +6746 self.spaces[SpaceId::Data].number_spaces.get_mut(&path_id) +6747 { +6748 pn_space.ping_pending = true; +6749 } +6750 } +6751 Ok(Some((path_id, remote))) +6752 } +6753 Err(e) => { +6754 debug!(%remote, %e, "nat traversal: failed to probe remote"); +6755 Err(e) +6756 } +6757 } +6758 } +6759 +6760 /// Initiates a new nat traversal round +6761 /// +6762 /// A nat traversal round involves advertising the client's local addresses in `REACH_OUT` +6763 /// frames, and initiating probing of the known remote addresses. When a new round is +6764 /// initiated, the previous one is cancelled, and paths that have not been opened are closed. +6765 /// +6766 /// Returns the server addresses that are now being probed. +6767 /// If addresses fail due to spurious errors, these might succeed later and not be returned in +6768 /// this set. +6769 pub fn initiate_nat_traversal_round( +6770 &mut self, +6771 now: Instant, +6772 ) -> Result<Vec<SocketAddr>, n0_nat_traversal::Error> { +6773 if self.state.is_closed() { +6774 return Err(n0_nat_traversal::Error::Closed); +6775 } +6776 +6777 let ipv6 = self.is_ipv6(); +6778 let client_state = self.n0_nat_traversal.client_side_mut()?; +6779 let n0_nat_traversal::NatTraversalRound { +6780 new_round, +6781 reach_out_at, +6782 addresses_to_probe, +6783 prev_round_path_ids, +6784 } = client_state.initiate_nat_traversal_round(ipv6)?; +6785 +6786 trace!(%new_round, reach_out=reach_out_at.len(), to_probe=addresses_to_probe.len(), +6787 "initiating nat traversal round"); 6788 -6789 for path_id in prev_round_path_ids { -6790 let Some(path) = self.path(path_id) else { -6791 continue; -6792 }; -6793 let ip = path.network_path.remote.ip(); -6794 let port = path.network_path.remote.port(); -6795 -6796 // We only close paths that aren't validated (thus are working) that we opened -6797 // in a previous round. -6798 // And we only close paths that we don't want to probe anyways. -6799 if !addresses_to_probe -6800 .iter() -6801 .any(|(_, probe)| *probe == (ip, port)) -6802 && !path.validated -6803 && !self.abandoned_paths.contains(&path_id) -6804 { -6805 trace!(%path_id, "closing path from previous round"); -6806 let _ = -6807 self.close_path_inner(now, path_id, PathAbandonReason::NatTraversalRoundEnded); -6808 } -6809 } -6810 -6811 let mut err = None; +6789 self.spaces[SpaceId::Data].pending.reach_out = Some((new_round, reach_out_at)); +6790 +6791 for path_id in prev_round_path_ids { +6792 let Some(path) = self.path(path_id) else { +6793 continue; +6794 }; +6795 let ip = path.network_path.remote.ip(); +6796 let port = path.network_path.remote.port(); +6797 +6798 // We only close paths that aren't validated (thus are working) that we opened +6799 // in a previous round. +6800 // And we only close paths that we don't want to probe anyways. +6801 if !addresses_to_probe +6802 .iter() +6803 .any(|(_, probe)| *probe == (ip, port)) +6804 && !path.validated +6805 && !self.abandoned_paths.contains(&path_id) +6806 { +6807 trace!(%path_id, "closing path from previous round"); +6808 let _ = +6809 self.close_path_inner(now, path_id, PathAbandonReason::NatTraversalRoundEnded); +6810 } +6811 } 6812 -6813 let mut path_ids = Vec::with_capacity(addresses_to_probe.len()); -6814 let mut probed_addresses = Vec::with_capacity(addresses_to_probe.len()); -6815 -6816 for (id, address) in addresses_to_probe { -6817 match self.open_nat_traversal_path(now, address) { -6818 Ok(None) => {} -6819 Ok(Some((path_id, remote))) => { -6820 path_ids.push(path_id); -6821 probed_addresses.push(remote); -6822 } -6823 Err(e) => { -6824 self.n0_nat_traversal -6825 .client_side_mut() -6826 .expect("validated") -6827 .report_in_continuation(id, e); -6828 err.get_or_insert(e); -6829 } -6830 } -6831 } -6832 -6833 if let Some(err) = err { -6834 // We failed to probe any addresses, bail out -6835 if probed_addresses.is_empty() { -6836 return Err(n0_nat_traversal::Error::Multipath(err)); -6837 } -6838 } -6839 -6840 self.n0_nat_traversal -6841 .client_side_mut() -6842 .expect("connection side validated") -6843 .set_round_path_ids(path_ids); -6844 -6845 Ok(probed_addresses) -6846 } -6847 -6848 /// Attempts to continue a nat traversal round by trying to open paths for pending client probes. -6849 /// -6850 /// If there was nothing to do, it returns `None`. Otherwise it returns whether the path was -6851 /// successfully open. -6852 fn continue_nat_traversal_round(&mut self, now: Instant) -> Option<bool> { -6853 let ipv6 = self.is_ipv6(); -6854 let client_state = self.n0_nat_traversal.client_side_mut().ok()?; -6855 let (id, address) = client_state.continue_nat_traversal_round(ipv6)?; -6856 let open_result = self.open_nat_traversal_path(now, address); -6857 let client_state = self.n0_nat_traversal.client_side_mut().expect("validated"); -6858 match open_result { -6859 Ok(None) => Some(true), -6860 Ok(Some((path_id, _remote))) => { -6861 client_state.add_round_path_id(path_id); -6862 Some(true) -6863 } -6864 Err(e) => { -6865 client_state.report_in_continuation(id, e); -6866 Some(false) -6867 } -6868 } -6869 } -6870} -6871 -6872impl fmt::Debug for Connection { -6873 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -6874 f.debug_struct("Connection") -6875 .field("handshake_cid", &self.handshake_cid) -6876 .finish() -6877 } -6878} -6879 -6880/// Hints when the caller identifies a network change. -6881pub trait NetworkChangeHint: std::fmt::Debug + 'static { -6882 /// Inform the connection if a path may recover after a network change. -6883 /// -6884 /// After network changes, paths may not be recoverable. In this case, waiting for the path to -6885 /// become idle may take longer than what is desirable. If [`Self::is_path_recoverable`] -6886 /// returns `false`, a multipath-enabled, client-side connection will establish a new path to -6887 /// the same remote, closing the current one, instead of migrating the path. -6888 /// -6889 /// Paths that are deemed recoverable will simply be sent a PING for a liveness check. -6890 fn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool; -6891} -6892 -6893/// Return value for [`Connection::poll_transmit_on_path`]. -6894#[derive(Debug)] -6895enum PollPathStatus { -6896 /// Nothing to send on the path, nothing was written into the [`TransmitBuf`]. -6897 NothingToSend { -6898 /// If true there was data to send but congestion control did not allow so. -6899 congestion_blocked: bool, -6900 }, -6901 /// The transmit is ready to be sent. -6902 Send(Transmit), -6903} -6904 -6905/// Return value for [`Connection::poll_transmit_path_space`]. -6906#[derive(Debug)] -6907enum PollPathSpaceStatus { -6908 /// Nothing to send in the space, nothing was written into the [`TransmitBuf`]. -6909 NothingToSend { -6910 /// If true there was data to send but congestion control did not allow so. -6911 congestion_blocked: bool, -6912 }, -6913 /// One or more packets have been written into the [`TransmitBuf`]. -6914 WrotePacket { -6915 /// The highest packet number. -6916 last_packet_number: u64, -6917 /// Whether to pad an already started datagram in the next packet. -6918 /// -6919 /// When packets in Initial, 0-RTT or Handshake packet do not fill the entire -6920 /// datagram they may decide to coalesce with the next packet from a higher -6921 /// encryption level on the same path. But the earlier packet may require specific -6922 /// size requirements for the datagram they are sent in. -6923 /// -6924 /// If a space did not complete the datagram, they use this to request the correct -6925 /// padding in the final packet of the datagram so that the final datagram will have -6926 /// the correct size. -6927 /// -6928 /// If a space did fill an entire datagram, it leaves this to the default of -6929 /// [`PadDatagram::No`]. -6930 pad_datagram: PadDatagram, -6931 }, -6932 /// Send the contents of the transmit immediately. -6933 /// -6934 /// Packets were written and the GSO batch must end now, regardless from whether higher -6935 /// spaces still have frames to write. This is used when the last datagram written would -6936 /// require too much padding to continue a GSO batch, which would waste space on the -6937 /// wire. -6938 Send { -6939 /// The highest packet number written into the transmit. -6940 last_packet_number: u64, -6941 }, -6942} -6943 -6944/// Information used to decide what frames to schedule into which packets. -6945/// -6946/// Primarily used by [`Connection::poll_transmit_on_path`] and the functions that help -6947/// building packets for it: [`Connection::poll_transmit_path_space`] and -6948/// [`Connection::populate_packet`]. -6949#[derive(Debug, Copy, Clone)] -6950struct PathSchedulingInfo { -6951 /// Whether the path is abandoned. -6952 /// -6953 /// Note that a path that is abandoned but still has CIDs can still send a packet. After -6954 /// sending that packet the CIDs issued by the remote have to be considered retired as -6955 /// well. -6956 is_abandoned: bool, -6957 /// Whether the path may send [`SpaceKind::Data`] frames. -6958 /// -6959 /// Some paths should only send frames from [`SendableFrames::space_specific`]. All other -6960 /// frames are essentially frames that can be sent on any [`SpaceKind::Data`] space. For -6961 /// those we want to respect packet scheduling rules however. -6962 /// -6963 /// Roughly speaking data frames are only sent on spaces that have CIDs, are not -6964 /// abandoned and have no *better* spaces. However see to comments where this is -6965 /// populated for the exact packet scheduling implementation. -6966 /// -6967 /// This essentially marks this paths as the best validated space ID. Except during -6968 /// the handshake in which case it does not need to be validated. Several paths could be -6969 /// equally good and all have this set to `true`, in that case packet scheduling can -6970 /// choose which path to use. Currently it chooses the lowest path that is not -6971 /// congestion blocked. -6972 /// -6973 /// Note that once in the closed or draining states this will never be true. -6974 may_send_data: bool, -6975 /// Whether the path may send a CONNECTION_CLOSE frame. -6976 /// -6977 /// This essentially marks this path as the best validated space ID with a fallback -6978 /// to unvalidated spaces if there are no validated spaces. Like for -6979 /// [`Self::may_send_data`] other paths could be equally good. -6980 may_send_close: bool, -6981 may_self_abandon: bool, -6982} -6983 -6984#[derive(Debug, Copy, Clone, PartialEq, Eq)] -6985enum PathBlocked { -6986 No, -6987 AntiAmplification, -6988 Congestion, -6989 Pacing, -6990} -6991 -6992/// Fields of `Connection` specific to it being client-side or server-side -6993enum ConnectionSide { -6994 Client { -6995 /// Sent in every outgoing Initial packet. Always empty after Initial keys are discarded -6996 token: Bytes, -6997 token_store: Arc<dyn TokenStore>, -6998 server_name: String, -6999 }, -7000 Server { -7001 server_config: Arc<ServerConfig>, -7002 }, -7003} -7004 -7005impl ConnectionSide { -7006 fn remote_may_migrate(&self, state: &State) -> bool { -7007 match self { -7008 Self::Server { server_config } => server_config.migration, -7009 Self::Client { .. } => { -7010 if let Some(hs) = state.as_handshake() { -7011 hs.allow_server_migration -7012 } else { -7013 false -7014 } -7015 } -7016 } -7017 } -7018 -7019 fn is_client(&self) -> bool { -7020 self.side().is_client() -7021 } -7022 -7023 fn is_server(&self) -> bool { -7024 self.side().is_server() -7025 } -7026 -7027 fn side(&self) -> Side { -7028 match *self { -7029 Self::Client { .. } => Side::Client, -7030 Self::Server { .. } => Side::Server, -7031 } -7032 } -7033} -7034 -7035impl From<SideArgs> for ConnectionSide { -7036 fn from(side: SideArgs) -> Self { -7037 match side { -7038 SideArgs::Client { -7039 token_store, -7040 server_name, -7041 } => Self::Client { -7042 token: token_store.take(&server_name).unwrap_or_default(), -7043 token_store, -7044 server_name, -7045 }, -7046 SideArgs::Server { -7047 server_config, -7048 pref_addr_cid: _, -7049 path_validated: _, -7050 } => Self::Server { server_config }, -7051 } -7052 } -7053} -7054 -7055/// Parameters to `Connection::new` specific to it being client-side or server-side -7056pub(crate) enum SideArgs { -7057 Client { -7058 token_store: Arc<dyn TokenStore>, -7059 server_name: String, -7060 }, -7061 Server { -7062 server_config: Arc<ServerConfig>, -7063 pref_addr_cid: Option<ConnectionId>, -7064 path_validated: bool, -7065 }, -7066} -7067 -7068impl SideArgs { -7069 pub(crate) fn pref_addr_cid(&self) -> Option<ConnectionId> { -7070 match *self { -7071 Self::Client { .. } => None, -7072 Self::Server { pref_addr_cid, .. } => pref_addr_cid, -7073 } -7074 } -7075 -7076 pub(crate) fn path_validated(&self) -> bool { -7077 match *self { -7078 Self::Client { .. } => true, -7079 Self::Server { path_validated, .. } => path_validated, -7080 } -7081 } -7082 -7083 pub(crate) fn side(&self) -> Side { -7084 match *self { -7085 Self::Client { .. } => Side::Client, -7086 Self::Server { .. } => Side::Server, -7087 } -7088 } -7089} -7090 -7091/// Reasons why a connection might be lost -7092#[derive(Debug, Error, Clone, PartialEq, Eq)] -7093pub enum ConnectionError { -7094 /// The peer doesn't implement any supported version -7095 #[error("peer doesn't implement any supported version")] -7096 VersionMismatch, -7097 /// The peer violated the QUIC specification as understood by this implementation -7098 #[error(transparent)] -7099 TransportError(#[from] TransportError), -7100 /// The peer's QUIC stack aborted the connection automatically -7101 #[error("aborted by peer: {0}")] -7102 ConnectionClosed(frame::ConnectionClose), -7103 /// The peer closed the connection -7104 #[error("closed by peer: {0}")] -7105 ApplicationClosed(frame::ApplicationClose), -7106 /// The peer is unable to continue processing this connection, usually due to having restarted -7107 #[error("reset by peer")] -7108 Reset, -7109 /// Communication with the peer has lapsed for longer than the negotiated idle timeout -7110 /// -7111 /// If neither side is sending keep-alives, a connection will time out after a long enough idle -7112 /// period even if the peer is still reachable. See also [`TransportConfig::max_idle_timeout()`] -7113 /// and [`TransportConfig::keep_alive_interval()`]. -7114 #[error("timed out")] -7115 TimedOut, -7116 /// The local application closed the connection -7117 #[error("closed")] -7118 LocallyClosed, -7119 /// The connection could not be created because not enough of the CID space is available -7120 /// -7121 /// Try using longer connection IDs. -7122 #[error("CIDs exhausted")] -7123 CidsExhausted, -7124} -7125 -7126impl From<Close> for ConnectionError { -7127 fn from(x: Close) -> Self { -7128 match x { -7129 Close::Connection(reason) => Self::ConnectionClosed(reason), -7130 Close::Application(reason) => Self::ApplicationClosed(reason), -7131 } -7132 } -7133} -7134 -7135// For compatibility with API consumers -7136impl From<ConnectionError> for io::Error { -7137 fn from(x: ConnectionError) -> Self { -7138 use ConnectionError::*; -7139 let kind = match x { -7140 TimedOut => io::ErrorKind::TimedOut, -7141 Reset => io::ErrorKind::ConnectionReset, -7142 ApplicationClosed(_) | ConnectionClosed(_) => io::ErrorKind::ConnectionAborted, -7143 TransportError(_) | VersionMismatch | LocallyClosed | CidsExhausted => { -7144 io::ErrorKind::Other -7145 } -7146 }; -7147 Self::new(kind, x) -7148 } -7149} -7150 -7151/// Errors that might trigger a path being closed -7152// TODO(@divma): maybe needs to be reworked based on what we want to do with the public API -7153#[derive(Debug, Error, PartialEq, Eq, Clone, Copy)] -7154pub enum PathError { -7155 /// The extension was not negotiated with the peer -7156 #[error("multipath extension not negotiated")] -7157 MultipathNotNegotiated, -7158 /// Paths can only be opened client-side -7159 #[error("the server side may not open a path")] -7160 ServerSideNotAllowed, -7161 /// Current limits do not allow us to open more paths -7162 #[error("maximum number of concurrent paths reached")] -7163 MaxPathIdReached, -7164 /// No remote CIDs available to open a new path -7165 #[error("remoted CIDs exhausted")] -7166 RemoteCidsExhausted, -7167 /// Path could not be validated and will be abandoned -7168 #[error("path validation failed")] -7169 ValidationFailed, -7170 /// The remote address for the path is not supported by the endpoint -7171 #[error("invalid remote address")] -7172 InvalidRemoteAddress(SocketAddr), -7173} -7174 -7175/// Errors triggered when abandoning a path -7176#[derive(Debug, Error, Clone, Eq, PartialEq)] -7177pub enum ClosePathError { -7178 /// Multipath is not negotiated -7179 #[error("Multipath extension not negotiated")] -7180 MultipathNotNegotiated, -7181 /// The path is already closed or was never opened -7182 #[error("closed path")] -7183 ClosedPath, -7184 /// This is the last path, which can not be abandoned -7185 #[error("last open path")] -7186 LastOpenPath, -7187} -7188 -7189/// Error when the multipath extension was not negotiated, but attempted to be used. -7190#[derive(Debug, Error, Clone, Copy)] -7191#[error("Multipath extension not negotiated")] -7192pub struct MultipathNotNegotiated { -7193 _private: (), -7194} -7195 -7196/// Events of interest to the application -7197#[derive(Debug)] -7198pub enum Event { -7199 /// The connection's handshake data is ready -7200 HandshakeDataReady, -7201 /// The connection was successfully established -7202 Connected, -7203 /// The TLS handshake was confirmed -7204 HandshakeConfirmed, -7205 /// The connection was lost -7206 /// -7207 /// Emitted if the peer closes the connection or an error is encountered. -7208 ConnectionLost { -7209 /// Reason that the connection was closed -7210 reason: ConnectionError, -7211 }, -7212 /// Stream events -7213 Stream(StreamEvent), -7214 /// One or more application datagrams have been received -7215 DatagramReceived, -7216 /// One or more application datagrams have been sent after blocking -7217 DatagramsUnblocked, -7218 /// (Multi)Path events -7219 Path(PathEvent), -7220 /// n0's nat traversal events -7221 NatTraversal(n0_nat_traversal::Event), -7222} -7223 -7224impl From<PathEvent> for Event { -7225 fn from(source: PathEvent) -> Self { -7226 Self::Path(source) -7227 } -7228} -7229 -7230fn get_max_ack_delay(params: &TransportParameters) -> Duration { -7231 Duration::from_micros(params.max_ack_delay.0 * 1000) -7232} -7233 -7234// Prevents overflow and improves behavior in extreme circumstances -7235const MAX_BACKOFF_EXPONENT: u32 = 16; -7236 -7237/// Minimal remaining size to allow packet coalescing, excluding cryptographic tag -7238/// -7239/// This must be at least as large as the header for a well-formed empty packet to be coalesced, -7240/// plus some space for frames. We only care about handshake headers because short header packets -7241/// necessarily have smaller headers, and initial packets are only ever the first packet in a -7242/// datagram (because we coalesce in ascending packet space order and the only reason to split a -7243/// packet is when packet space changes). -7244const MIN_PACKET_SPACE: usize = MAX_HANDSHAKE_OR_0RTT_HEADER_SIZE + 32; -7245 -7246/// Largest amount of space that could be occupied by a Handshake or 0-RTT packet's header -7247/// -7248/// Excludes packet-type-specific fields such as packet number or Initial token -7249// https://www.rfc-editor.org/rfc/rfc9000.html#name-0-rtt: flags + version + dcid len + dcid + -7250// scid len + scid + length + pn -7251const MAX_HANDSHAKE_OR_0RTT_HEADER_SIZE: usize = -7252 1 + 4 + 1 + MAX_CID_SIZE + 1 + MAX_CID_SIZE + VarInt::from_u32(u16::MAX as u32).size() + 4; -7253 -7254#[derive(Default)] -7255struct SentFrames { -7256 retransmits: ThinRetransmits, -7257 /// The packet number of the largest acknowledged packet for each path -7258 largest_acked: FxHashMap<PathId, u64>, -7259 stream_frames: StreamMetaVec, -7260 /// Whether the packet contains non-retransmittable frames (like datagrams) -7261 non_retransmits: bool, -7262 /// If the datagram containing these frames should be padded to the min MTU -7263 requires_padding: bool, -7264} -7265 -7266impl SentFrames { -7267 /// Returns whether the packet contains only ACKs -7268 fn is_ack_only(&self, streams: &StreamsState) -> bool { -7269 !self.largest_acked.is_empty() -7270 && !self.non_retransmits -7271 && self.stream_frames.is_empty() -7272 && self.retransmits.is_empty(streams) -7273 } -7274 -7275 fn retransmits_mut(&mut self) -> &mut Retransmits { -7276 self.retransmits.get_or_create() -7277 } -7278 -7279 fn record_sent_frame(&mut self, frame: frame::EncodableFrame<'_>) { -7280 use frame::EncodableFrame::*; -7281 match frame { -7282 PathAck(path_ack_encoder) => { -7283 if let Some(max) = path_ack_encoder.ranges.max() { -7284 self.largest_acked.insert(path_ack_encoder.path_id, max); -7285 } -7286 } -7287 Ack(ack_encoder) => { -7288 if let Some(max) = ack_encoder.ranges.max() { -7289 self.largest_acked.insert(PathId::ZERO, max); -7290 } -7291 } -7292 Close(_) => { /* non retransmittable, but after this we don't really care */ } -7293 PathResponse(_) => self.non_retransmits = true, -7294 HandshakeDone(_) => self.retransmits_mut().handshake_done = true, -7295 ReachOut(frame::ReachOut { round, ip, port }) => { -7296 let (recorded_round, reach_outs) = self -7297 .retransmits_mut() -7298 .reach_out -7299 .get_or_insert_with(|| (round, FxHashSet::default())); -7300 // Only record reach outs for the current round or a newer than the recorded one. -7301 if *recorded_round == round { -7302 // Same round, simply append. -7303 reach_outs.insert((ip, port)); -7304 } else if *recorded_round < round { -7305 // New round. -7306 *recorded_round = round; -7307 reach_outs.drain(); -7308 reach_outs.insert((ip, port)); -7309 } else { -7310 // ignore old reach out that was sent -7311 } -7312 } -7313 -7314 ObservedAddr(_) => self.retransmits_mut().observed_addr = true, -7315 Ping(_) => self.non_retransmits = true, -7316 ImmediateAck(_) => self.non_retransmits = true, -7317 AckFrequency(_) => self.retransmits_mut().ack_frequency = true, -7318 PathChallenge(_) => self.non_retransmits = true, -7319 Crypto(crypto) => self.retransmits_mut().crypto.push_back(crypto), -7320 PathAbandon(path_abandon) => { -7321 self.retransmits_mut() -7322 .path_abandon -7323 .entry(path_abandon.path_id) -7324 .or_insert(path_abandon.error_code); -7325 } -7326 PathStatusAvailable(frame::PathStatusAvailable { path_id, .. }) -7327 | PathStatusBackup(frame::PathStatusBackup { path_id, .. }) => { -7328 self.retransmits_mut().path_status.insert(path_id); -7329 } -7330 MaxPathId(_) => self.retransmits_mut().max_path_id = true, -7331 PathsBlocked(_) => self.retransmits_mut().paths_blocked = true, -7332 PathCidsBlocked(path_cids_blocked) => { -7333 self.retransmits_mut() -7334 .path_cids_blocked -7335 .insert(path_cids_blocked.path_id); -7336 } -7337 ResetStream(reset) => self -7338 .retransmits_mut() -7339 .reset_stream -7340 .push((reset.id, reset.error_code)), -7341 StopSending(stop_sending) => self.retransmits_mut().stop_sending.push(stop_sending), -7342 NewConnectionId(new_cid) => self.retransmits_mut().new_cids.push(new_cid.issued()), -7343 RetireConnectionId(retire_cid) => self -7344 .retransmits_mut() -7345 .retire_cids -7346 .push((retire_cid.path_id.unwrap_or_default(), retire_cid.sequence)), -7347 Datagram(_) => self.non_retransmits = true, -7348 NewToken(_) => {} -7349 AddAddress(add_address) => { -7350 self.retransmits_mut().add_address.insert(add_address); -7351 } -7352 RemoveAddress(remove_address) => { -7353 self.retransmits_mut().remove_address.insert(remove_address); -7354 } -7355 StreamMeta(stream_meta_encoder) => self.stream_frames.push(stream_meta_encoder.meta), -7356 MaxData(_) => self.retransmits_mut().max_data = true, -7357 MaxStreamData(max) => { -7358 self.retransmits_mut().max_stream_data.insert(max.id); -7359 } -7360 MaxStreams(max_streams) => { -7361 self.retransmits_mut().max_stream_id[max_streams.dir as usize] = true -7362 } -7363 } -7364 } -7365} -7366 -7367/// Compute the negotiated idle timeout based on local and remote max_idle_timeout transport parameters. -7368/// -7369/// According to the definition of max_idle_timeout, a value of `0` means the timeout is disabled; see <https://www.rfc-editor.org/rfc/rfc9000#section-18.2-4.4.1.> +6813 let mut err = None; +6814 +6815 let mut path_ids = Vec::with_capacity(addresses_to_probe.len()); +6816 let mut probed_addresses = Vec::with_capacity(addresses_to_probe.len()); +6817 +6818 for (id, address) in addresses_to_probe { +6819 match self.open_nat_traversal_path(now, address) { +6820 Ok(None) => {} +6821 Ok(Some((path_id, remote))) => { +6822 path_ids.push(path_id); +6823 probed_addresses.push(remote); +6824 } +6825 Err(e) => { +6826 self.n0_nat_traversal +6827 .client_side_mut() +6828 .expect("validated") +6829 .report_in_continuation(id, e); +6830 err.get_or_insert(e); +6831 } +6832 } +6833 } +6834 +6835 if let Some(err) = err { +6836 // We failed to probe any addresses, bail out +6837 if probed_addresses.is_empty() { +6838 return Err(n0_nat_traversal::Error::Multipath(err)); +6839 } +6840 } +6841 +6842 self.n0_nat_traversal +6843 .client_side_mut() +6844 .expect("connection side validated") +6845 .set_round_path_ids(path_ids); +6846 +6847 Ok(probed_addresses) +6848 } +6849 +6850 /// Attempts to continue a nat traversal round by trying to open paths for pending client probes. +6851 /// +6852 /// If there was nothing to do, it returns `None`. Otherwise it returns whether the path was +6853 /// successfully open. +6854 fn continue_nat_traversal_round(&mut self, now: Instant) -> Option<bool> { +6855 let ipv6 = self.is_ipv6(); +6856 let client_state = self.n0_nat_traversal.client_side_mut().ok()?; +6857 let (id, address) = client_state.continue_nat_traversal_round(ipv6)?; +6858 let open_result = self.open_nat_traversal_path(now, address); +6859 let client_state = self.n0_nat_traversal.client_side_mut().expect("validated"); +6860 match open_result { +6861 Ok(None) => Some(true), +6862 Ok(Some((path_id, _remote))) => { +6863 client_state.add_round_path_id(path_id); +6864 Some(true) +6865 } +6866 Err(e) => { +6867 client_state.report_in_continuation(id, e); +6868 Some(false) +6869 } +6870 } +6871 } +6872} +6873 +6874impl fmt::Debug for Connection { +6875 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +6876 f.debug_struct("Connection") +6877 .field("handshake_cid", &self.handshake_cid) +6878 .finish() +6879 } +6880} +6881 +6882/// Hints when the caller identifies a network change. +6883pub trait NetworkChangeHint: std::fmt::Debug + 'static { +6884 /// Inform the connection if a path may recover after a network change. +6885 /// +6886 /// After network changes, paths may not be recoverable. In this case, waiting for the path to +6887 /// become idle may take longer than what is desirable. If [`Self::is_path_recoverable`] +6888 /// returns `false`, a multipath-enabled, client-side connection will establish a new path to +6889 /// the same remote, closing the current one, instead of migrating the path. +6890 /// +6891 /// Paths that are deemed recoverable will simply be sent a PING for a liveness check. +6892 fn is_path_recoverable(&self, path_id: PathId, network_path: FourTuple) -> bool; +6893} +6894 +6895/// Return value for [`Connection::poll_transmit_on_path`]. +6896#[derive(Debug)] +6897enum PollPathStatus { +6898 /// Nothing to send on the path, nothing was written into the [`TransmitBuf`]. +6899 NothingToSend { +6900 /// If true there was data to send but congestion control did not allow so. +6901 congestion_blocked: bool, +6902 }, +6903 /// The transmit is ready to be sent. +6904 Send(Transmit), +6905} +6906 +6907/// Return value for [`Connection::poll_transmit_path_space`]. +6908#[derive(Debug)] +6909enum PollPathSpaceStatus { +6910 /// Nothing to send in the space, nothing was written into the [`TransmitBuf`]. +6911 NothingToSend { +6912 /// If true there was data to send but congestion control did not allow so. +6913 congestion_blocked: bool, +6914 }, +6915 /// One or more packets have been written into the [`TransmitBuf`]. +6916 WrotePacket { +6917 /// The highest packet number. +6918 last_packet_number: u64, +6919 /// Whether to pad an already started datagram in the next packet. +6920 /// +6921 /// When packets in Initial, 0-RTT or Handshake packet do not fill the entire +6922 /// datagram they may decide to coalesce with the next packet from a higher +6923 /// encryption level on the same path. But the earlier packet may require specific +6924 /// size requirements for the datagram they are sent in. +6925 /// +6926 /// If a space did not complete the datagram, they use this to request the correct +6927 /// padding in the final packet of the datagram so that the final datagram will have +6928 /// the correct size. +6929 /// +6930 /// If a space did fill an entire datagram, it leaves this to the default of +6931 /// [`PadDatagram::No`]. +6932 pad_datagram: PadDatagram, +6933 }, +6934 /// Send the contents of the transmit immediately. +6935 /// +6936 /// Packets were written and the GSO batch must end now, regardless from whether higher +6937 /// spaces still have frames to write. This is used when the last datagram written would +6938 /// require too much padding to continue a GSO batch, which would waste space on the +6939 /// wire. +6940 Send { +6941 /// The highest packet number written into the transmit. +6942 last_packet_number: u64, +6943 }, +6944} +6945 +6946/// Information used to decide what frames to schedule into which packets. +6947/// +6948/// Primarily used by [`Connection::poll_transmit_on_path`] and the functions that help +6949/// building packets for it: [`Connection::poll_transmit_path_space`] and +6950/// [`Connection::populate_packet`]. +6951#[derive(Debug, Copy, Clone)] +6952struct PathSchedulingInfo { +6953 /// Whether the path is abandoned. +6954 /// +6955 /// Note that a path that is abandoned but still has CIDs can still send a packet. After +6956 /// sending that packet the CIDs issued by the remote have to be considered retired as +6957 /// well. +6958 is_abandoned: bool, +6959 /// Whether the path may send [`SpaceKind::Data`] frames. +6960 /// +6961 /// Some paths should only send frames from [`SendableFrames::space_specific`]. All other +6962 /// frames are essentially frames that can be sent on any [`SpaceKind::Data`] space. For +6963 /// those we want to respect packet scheduling rules however. +6964 /// +6965 /// Roughly speaking data frames are only sent on spaces that have CIDs, are not +6966 /// abandoned and have no *better* spaces. However see to comments where this is +6967 /// populated for the exact packet scheduling implementation. +6968 /// +6969 /// This essentially marks this paths as the best validated space ID. Except during +6970 /// the handshake in which case it does not need to be validated. Several paths could be +6971 /// equally good and all have this set to `true`, in that case packet scheduling can +6972 /// choose which path to use. Currently it chooses the lowest path that is not +6973 /// congestion blocked. +6974 /// +6975 /// Note that once in the closed or draining states this will never be true. +6976 may_send_data: bool, +6977 /// Whether the path may send a CONNECTION_CLOSE frame. +6978 /// +6979 /// This essentially marks this path as the best validated space ID with a fallback +6980 /// to unvalidated spaces if there are no validated spaces. Like for +6981 /// [`Self::may_send_data`] other paths could be equally good. +6982 may_send_close: bool, +6983 may_self_abandon: bool, +6984} +6985 +6986#[derive(Debug, Copy, Clone, PartialEq, Eq)] +6987enum PathBlocked { +6988 No, +6989 AntiAmplification, +6990 Congestion, +6991 Pacing, +6992} +6993 +6994/// Fields of `Connection` specific to it being client-side or server-side +6995enum ConnectionSide { +6996 Client { +6997 /// Sent in every outgoing Initial packet. Always empty after Initial keys are discarded +6998 token: Bytes, +6999 token_store: Arc<dyn TokenStore>, +7000 server_name: String, +7001 }, +7002 Server { +7003 server_config: Arc<ServerConfig>, +7004 }, +7005} +7006 +7007impl ConnectionSide { +7008 fn remote_may_migrate(&self, state: &State) -> bool { +7009 match self { +7010 Self::Server { server_config } => server_config.migration, +7011 Self::Client { .. } => { +7012 if let Some(hs) = state.as_handshake() { +7013 hs.allow_server_migration +7014 } else { +7015 false +7016 } +7017 } +7018 } +7019 } +7020 +7021 fn is_client(&self) -> bool { +7022 self.side().is_client() +7023 } +7024 +7025 fn is_server(&self) -> bool { +7026 self.side().is_server() +7027 } +7028 +7029 fn side(&self) -> Side { +7030 match *self { +7031 Self::Client { .. } => Side::Client, +7032 Self::Server { .. } => Side::Server, +7033 } +7034 } +7035} +7036 +7037impl From<SideArgs> for ConnectionSide { +7038 fn from(side: SideArgs) -> Self { +7039 match side { +7040 SideArgs::Client { +7041 token_store, +7042 server_name, +7043 } => Self::Client { +7044 token: token_store.take(&server_name).unwrap_or_default(), +7045 token_store, +7046 server_name, +7047 }, +7048 SideArgs::Server { +7049 server_config, +7050 pref_addr_cid: _, +7051 path_validated: _, +7052 } => Self::Server { server_config }, +7053 } +7054 } +7055} +7056 +7057/// Parameters to `Connection::new` specific to it being client-side or server-side +7058pub(crate) enum SideArgs { +7059 Client { +7060 token_store: Arc<dyn TokenStore>, +7061 server_name: String, +7062 }, +7063 Server { +7064 server_config: Arc<ServerConfig>, +7065 pref_addr_cid: Option<ConnectionId>, +7066 path_validated: bool, +7067 }, +7068} +7069 +7070impl SideArgs { +7071 pub(crate) fn pref_addr_cid(&self) -> Option<ConnectionId> { +7072 match *self { +7073 Self::Client { .. } => None, +7074 Self::Server { pref_addr_cid, .. } => pref_addr_cid, +7075 } +7076 } +7077 +7078 pub(crate) fn path_validated(&self) -> bool { +7079 match *self { +7080 Self::Client { .. } => true, +7081 Self::Server { path_validated, .. } => path_validated, +7082 } +7083 } +7084 +7085 pub(crate) fn side(&self) -> Side { +7086 match *self { +7087 Self::Client { .. } => Side::Client, +7088 Self::Server { .. } => Side::Server, +7089 } +7090 } +7091} +7092 +7093/// Reasons why a connection might be lost +7094#[derive(Debug, Error, Clone, PartialEq, Eq)] +7095pub enum ConnectionError { +7096 /// The peer doesn't implement any supported version +7097 #[error("peer doesn't implement any supported version")] +7098 VersionMismatch, +7099 /// The peer violated the QUIC specification as understood by this implementation +7100 #[error(transparent)] +7101 TransportError(#[from] TransportError), +7102 /// The peer's QUIC stack aborted the connection automatically +7103 #[error("aborted by peer: {0}")] +7104 ConnectionClosed(frame::ConnectionClose), +7105 /// The peer closed the connection +7106 #[error("closed by peer: {0}")] +7107 ApplicationClosed(frame::ApplicationClose), +7108 /// The peer is unable to continue processing this connection, usually due to having restarted +7109 #[error("reset by peer")] +7110 Reset, +7111 /// Communication with the peer has lapsed for longer than the negotiated idle timeout +7112 /// +7113 /// If neither side is sending keep-alives, a connection will time out after a long enough idle +7114 /// period even if the peer is still reachable. See also [`TransportConfig::max_idle_timeout()`] +7115 /// and [`TransportConfig::keep_alive_interval()`]. +7116 #[error("timed out")] +7117 TimedOut, +7118 /// The local application closed the connection +7119 #[error("closed")] +7120 LocallyClosed, +7121 /// The connection could not be created because not enough of the CID space is available +7122 /// +7123 /// Try using longer connection IDs. +7124 #[error("CIDs exhausted")] +7125 CidsExhausted, +7126} +7127 +7128impl From<Close> for ConnectionError { +7129 fn from(x: Close) -> Self { +7130 match x { +7131 Close::Connection(reason) => Self::ConnectionClosed(reason), +7132 Close::Application(reason) => Self::ApplicationClosed(reason), +7133 } +7134 } +7135} +7136 +7137// For compatibility with API consumers +7138impl From<ConnectionError> for io::Error { +7139 fn from(x: ConnectionError) -> Self { +7140 use ConnectionError::*; +7141 let kind = match x { +7142 TimedOut => io::ErrorKind::TimedOut, +7143 Reset => io::ErrorKind::ConnectionReset, +7144 ApplicationClosed(_) | ConnectionClosed(_) => io::ErrorKind::ConnectionAborted, +7145 TransportError(_) | VersionMismatch | LocallyClosed | CidsExhausted => { +7146 io::ErrorKind::Other +7147 } +7148 }; +7149 Self::new(kind, x) +7150 } +7151} +7152 +7153/// Errors that might trigger a path being closed +7154// TODO(@divma): maybe needs to be reworked based on what we want to do with the public API +7155#[derive(Debug, Error, PartialEq, Eq, Clone, Copy)] +7156pub enum PathError { +7157 /// The extension was not negotiated with the peer +7158 #[error("multipath extension not negotiated")] +7159 MultipathNotNegotiated, +7160 /// Paths can only be opened client-side +7161 #[error("the server side may not open a path")] +7162 ServerSideNotAllowed, +7163 /// Current limits do not allow us to open more paths +7164 #[error("maximum number of concurrent paths reached")] +7165 MaxPathIdReached, +7166 /// No remote CIDs available to open a new path +7167 #[error("remoted CIDs exhausted")] +7168 RemoteCidsExhausted, +7169 /// Path could not be validated and will be abandoned +7170 #[error("path validation failed")] +7171 ValidationFailed, +7172 /// The remote address for the path is not supported by the endpoint +7173 #[error("invalid remote address")] +7174 InvalidRemoteAddress(SocketAddr), +7175} +7176 +7177/// Errors triggered when abandoning a path +7178#[derive(Debug, Error, Clone, Eq, PartialEq)] +7179pub enum ClosePathError { +7180 /// Multipath is not negotiated +7181 #[error("Multipath extension not negotiated")] +7182 MultipathNotNegotiated, +7183 /// The path is already closed or was never opened +7184 #[error("closed path")] +7185 ClosedPath, +7186 /// This is the last path, which can not be abandoned +7187 #[error("last open path")] +7188 LastOpenPath, +7189} +7190 +7191/// Error when the multipath extension was not negotiated, but attempted to be used. +7192#[derive(Debug, Error, Clone, Copy)] +7193#[error("Multipath extension not negotiated")] +7194pub struct MultipathNotNegotiated { +7195 _private: (), +7196} +7197 +7198/// Events of interest to the application +7199#[derive(Debug)] +7200pub enum Event { +7201 /// The connection's handshake data is ready +7202 HandshakeDataReady, +7203 /// The connection was successfully established +7204 Connected, +7205 /// The TLS handshake was confirmed +7206 HandshakeConfirmed, +7207 /// The connection was lost +7208 /// +7209 /// Emitted if the peer closes the connection or an error is encountered. +7210 ConnectionLost { +7211 /// Reason that the connection was closed +7212 reason: ConnectionError, +7213 }, +7214 /// Stream events +7215 Stream(StreamEvent), +7216 /// One or more application datagrams have been received +7217 DatagramReceived, +7218 /// One or more application datagrams have been sent after blocking +7219 DatagramsUnblocked, +7220 /// (Multi)Path events +7221 Path(PathEvent), +7222 /// n0's nat traversal events +7223 NatTraversal(n0_nat_traversal::Event), +7224} +7225 +7226impl From<PathEvent> for Event { +7227 fn from(source: PathEvent) -> Self { +7228 Self::Path(source) +7229 } +7230} +7231 +7232fn get_max_ack_delay(params: &TransportParameters) -> Duration { +7233 Duration::from_micros(params.max_ack_delay.0 * 1000) +7234} +7235 +7236// Prevents overflow and improves behavior in extreme circumstances +7237const MAX_BACKOFF_EXPONENT: u32 = 16; +7238 +7239/// Minimal remaining size to allow packet coalescing, excluding cryptographic tag +7240/// +7241/// This must be at least as large as the header for a well-formed empty packet to be coalesced, +7242/// plus some space for frames. We only care about handshake headers because short header packets +7243/// necessarily have smaller headers, and initial packets are only ever the first packet in a +7244/// datagram (because we coalesce in ascending packet space order and the only reason to split a +7245/// packet is when packet space changes). +7246const MIN_PACKET_SPACE: usize = MAX_HANDSHAKE_OR_0RTT_HEADER_SIZE + 32; +7247 +7248/// Largest amount of space that could be occupied by a Handshake or 0-RTT packet's header +7249/// +7250/// Excludes packet-type-specific fields such as packet number or Initial token +7251// https://www.rfc-editor.org/rfc/rfc9000.html#name-0-rtt: flags + version + dcid len + dcid + +7252// scid len + scid + length + pn +7253const MAX_HANDSHAKE_OR_0RTT_HEADER_SIZE: usize = +7254 1 + 4 + 1 + MAX_CID_SIZE + 1 + MAX_CID_SIZE + VarInt::from_u32(u16::MAX as u32).size() + 4; +7255 +7256#[derive(Default)] +7257struct SentFrames { +7258 retransmits: ThinRetransmits, +7259 /// The packet number of the largest acknowledged packet for each path +7260 largest_acked: FxHashMap<PathId, u64>, +7261 stream_frames: StreamMetaVec, +7262 /// Whether the packet contains non-retransmittable frames (like datagrams) +7263 non_retransmits: bool, +7264 /// If the datagram containing these frames should be padded to the min MTU +7265 requires_padding: bool, +7266} +7267 +7268impl SentFrames { +7269 /// Returns whether the packet contains only ACKs +7270 fn is_ack_only(&self, streams: &StreamsState) -> bool { +7271 !self.largest_acked.is_empty() +7272 && !self.non_retransmits +7273 && self.stream_frames.is_empty() +7274 && self.retransmits.is_empty(streams) +7275 } +7276 +7277 fn retransmits_mut(&mut self) -> &mut Retransmits { +7278 self.retransmits.get_or_create() +7279 } +7280 +7281 fn record_sent_frame(&mut self, frame: frame::EncodableFrame<'_>) { +7282 use frame::EncodableFrame::*; +7283 match frame { +7284 PathAck(path_ack_encoder) => { +7285 if let Some(max) = path_ack_encoder.ranges.max() { +7286 self.largest_acked.insert(path_ack_encoder.path_id, max); +7287 } +7288 } +7289 Ack(ack_encoder) => { +7290 if let Some(max) = ack_encoder.ranges.max() { +7291 self.largest_acked.insert(PathId::ZERO, max); +7292 } +7293 } +7294 Close(_) => { /* non retransmittable, but after this we don't really care */ } +7295 PathResponse(_) => self.non_retransmits = true, +7296 HandshakeDone(_) => self.retransmits_mut().handshake_done = true, +7297 ReachOut(frame::ReachOut { round, ip, port }) => { +7298 let (recorded_round, reach_outs) = self +7299 .retransmits_mut() +7300 .reach_out +7301 .get_or_insert_with(|| (round, FxHashSet::default())); +7302 // Only record reach outs for the current round or a newer than the recorded one. +7303 if *recorded_round == round { +7304 // Same round, simply append. +7305 reach_outs.insert((ip, port)); +7306 } else if *recorded_round < round { +7307 // New round. +7308 *recorded_round = round; +7309 reach_outs.drain(); +7310 reach_outs.insert((ip, port)); +7311 } else { +7312 // ignore old reach out that was sent +7313 } +7314 } +7315 +7316 ObservedAddr(_) => self.retransmits_mut().observed_addr = true, +7317 Ping(_) => self.non_retransmits = true, +7318 ImmediateAck(_) => self.non_retransmits = true, +7319 AckFrequency(_) => self.retransmits_mut().ack_frequency = true, +7320 PathChallenge(_) => self.non_retransmits = true, +7321 Crypto(crypto) => self.retransmits_mut().crypto.push_back(crypto), +7322 PathAbandon(path_abandon) => { +7323 self.retransmits_mut() +7324 .path_abandon +7325 .entry(path_abandon.path_id) +7326 .or_insert(path_abandon.error_code); +7327 } +7328 PathStatusAvailable(frame::PathStatusAvailable { path_id, .. }) +7329 | PathStatusBackup(frame::PathStatusBackup { path_id, .. }) => { +7330 self.retransmits_mut().path_status.insert(path_id); +7331 } +7332 MaxPathId(_) => self.retransmits_mut().max_path_id = true, +7333 PathsBlocked(_) => self.retransmits_mut().paths_blocked = true, +7334 PathCidsBlocked(path_cids_blocked) => { +7335 self.retransmits_mut() +7336 .path_cids_blocked +7337 .insert(path_cids_blocked.path_id); +7338 } +7339 ResetStream(reset) => self +7340 .retransmits_mut() +7341 .reset_stream +7342 .push((reset.id, reset.error_code)), +7343 StopSending(stop_sending) => self.retransmits_mut().stop_sending.push(stop_sending), +7344 NewConnectionId(new_cid) => self.retransmits_mut().new_cids.push(new_cid.issued()), +7345 RetireConnectionId(retire_cid) => self +7346 .retransmits_mut() +7347 .retire_cids +7348 .push((retire_cid.path_id.unwrap_or_default(), retire_cid.sequence)), +7349 Datagram(_) => self.non_retransmits = true, +7350 NewToken(_) => {} +7351 AddAddress(add_address) => { +7352 self.retransmits_mut().add_address.insert(add_address); +7353 } +7354 RemoveAddress(remove_address) => { +7355 self.retransmits_mut().remove_address.insert(remove_address); +7356 } +7357 StreamMeta(stream_meta_encoder) => self.stream_frames.push(stream_meta_encoder.meta), +7358 MaxData(_) => self.retransmits_mut().max_data = true, +7359 MaxStreamData(max) => { +7360 self.retransmits_mut().max_stream_data.insert(max.id); +7361 } +7362 MaxStreams(max_streams) => { +7363 self.retransmits_mut().max_stream_id[max_streams.dir as usize] = true +7364 } +7365 } +7366 } +7367} +7368 +7369/// Compute the negotiated idle timeout based on local and remote max_idle_timeout transport parameters. 7370/// -7371/// According to the negotiation procedure, either the minimum of the timeouts or one specified is used as the negotiated value; see <https://www.rfc-editor.org/rfc/rfc9000#section-10.1-2.> +7371/// According to the definition of max_idle_timeout, a value of `0` means the timeout is disabled; see <https://www.rfc-editor.org/rfc/rfc9000#section-18.2-4.4.1.> 7372/// -7373/// Returns the negotiated idle timeout as a `Duration`, or `None` when both endpoints have opted out of idle timeout. -7374fn negotiate_max_idle_timeout(x: Option<VarInt>, y: Option<VarInt>) -> Option<Duration> { -7375 match (x, y) { -7376 (Some(VarInt(0)) | None, Some(VarInt(0)) | None) => None, -7377 (Some(VarInt(0)) | None, Some(y)) => Some(Duration::from_millis(y.0)), -7378 (Some(x), Some(VarInt(0)) | None) => Some(Duration::from_millis(x.0)), -7379 (Some(x), Some(y)) => Some(Duration::from_millis(cmp::min(x, y).0)), -7380 } -7381} -7382 -7383#[cfg(test)] -7384mod tests { -7385 use super::*; -7386 -7387 #[test] -7388 fn negotiate_max_idle_timeout_commutative() { -7389 let test_params = [ -7390 (None, None, None), -7391 (None, Some(VarInt(0)), None), -7392 (None, Some(VarInt(2)), Some(Duration::from_millis(2))), -7393 (Some(VarInt(0)), Some(VarInt(0)), None), -7394 ( -7395 Some(VarInt(2)), -7396 Some(VarInt(0)), -7397 Some(Duration::from_millis(2)), -7398 ), -7399 ( -7400 Some(VarInt(1)), -7401 Some(VarInt(4)), -7402 Some(Duration::from_millis(1)), -7403 ), -7404 ]; -7405 -7406 for (left, right, result) in test_params { -7407 assert_eq!(negotiate_max_idle_timeout(left, right), result); -7408 assert_eq!(negotiate_max_idle_timeout(right, left), result); -7409 } -7410 } -7411}

    \ No newline at end of file +7373/// According to the negotiation procedure, either the minimum of the timeouts or one specified is used as the negotiated value; see <https://www.rfc-editor.org/rfc/rfc9000#section-10.1-2.> +7374/// +7375/// Returns the negotiated idle timeout as a `Duration`, or `None` when both endpoints have opted out of idle timeout. +7376fn negotiate_max_idle_timeout(x: Option<VarInt>, y: Option<VarInt>) -> Option<Duration> { +7377 match (x, y) { +7378 (Some(VarInt(0)) | None, Some(VarInt(0)) | None) => None, +7379 (Some(VarInt(0)) | None, Some(y)) => Some(Duration::from_millis(y.0)), +7380 (Some(x), Some(VarInt(0)) | None) => Some(Duration::from_millis(x.0)), +7381 (Some(x), Some(y)) => Some(Duration::from_millis(cmp::min(x, y).0)), +7382 } +7383} +7384 +7385#[cfg(test)] +7386mod tests { +7387 use super::*; +7388 +7389 #[test] +7390 fn negotiate_max_idle_timeout_commutative() { +7391 let test_params = [ +7392 (None, None, None), +7393 (None, Some(VarInt(0)), None), +7394 (None, Some(VarInt(2)), Some(Duration::from_millis(2))), +7395 (Some(VarInt(0)), Some(VarInt(0)), None), +7396 ( +7397 Some(VarInt(2)), +7398 Some(VarInt(0)), +7399 Some(Duration::from_millis(2)), +7400 ), +7401 ( +7402 Some(VarInt(1)), +7403 Some(VarInt(4)), +7404 Some(Duration::from_millis(1)), +7405 ), +7406 ]; +7407 +7408 for (left, right, result) in test_params { +7409 assert_eq!(negotiate_max_idle_timeout(left, right), result); +7410 assert_eq!(negotiate_max_idle_timeout(right, left), result); +7411 } +7412 } +7413}

    \ No newline at end of file