Skip to main content

PathRecord

Struct PathRecord 

Source
pub struct PathRecord {
    pub rtt_us: u64,
    pub min_rtt_us: u64,
    pub cwnd: u64,
    pub congestion_events: u64,
    pub lost_packets: u64,
    pub lost_bytes: u64,
    pub sent_packets: u64,
    pub current_mtu: u64,
    pub tx_datagrams: u64,
    pub tx_bytes: u64,
    pub rx_datagrams: u64,
    pub rx_bytes: u64,
}
Expand description

One REPORT record: the sender’s view of the QUIC path under the connection (docs/PROTOCOL.md §6.10, decisions/0036 §4.5). Numbers only; no address travels. A key the peer did not send reads as 0, and the encoder writes only the non-zero ones.

Fields§

§rtt_us: u64

Smoothed round-trip time, µs (key 0).

§min_rtt_us: u64

Smallest round-trip time seen, µs (key 1).

§cwnd: u64

Congestion window, bytes (key 2).

§congestion_events: u64

Congestion events the sender’s controller reacted to (key 3).

§lost_packets: u64

Packets the sender sent and declared lost (key 4).

§lost_bytes: u64

Bytes the sender sent and declared lost (key 5).

§sent_packets: u64

Packets the sender sent (key 6).

§current_mtu: u64

The largest UDP payload the path carries now (key 7).

§tx_datagrams: u64

UDP datagrams the sender sent (key 8).

§tx_bytes: u64

Bytes in them (key 9).

§rx_datagrams: u64

UDP datagrams the sender received (key 10).

§rx_bytes: u64

Bytes in them (key 11).

Implementations§

Source§

impl PathRecord

Source

pub fn encode_into(&self, out: &mut Vec<u8>)

Appends [varint length][CBOR map] to out. Twelve keys of at most nine bytes each stay far below limits::MAX_PATH_RECORD_BYTES.

Source

pub fn decode(input: &[u8]) -> Result<Option<(PathRecord, usize)>, HeaderError>

Decodes one record from the front of input.

Ok(None) means the input ends inside a record: read more bytes and retry, which is bounded because a record is at most limits::MAX_PATH_RECORD_BYTES bytes plus its prefix; at FIN the same answer is a truncated record and a violation. A length prefix above the cap is refused before any of the map is read.

Trait Implementations§

Source§

impl Clone for PathRecord

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PathRecord

Source§

impl Debug for PathRecord

Source§

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

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

impl Default for PathRecord

Source§

fn default() -> Self

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

impl Eq for PathRecord

Source§

impl PartialEq for PathRecord

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PathRecord

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.