web_wt_sys/webtransport/web_transport_connection_stats.rs
1//! [`WebTransportConnectionStats`]
2
3use wasm_bindgen::prelude::*;
4
5use super::*;
6
7crate::dictionary_type! {
8 /// ```webidl
9 /// dictionary WebTransportConnectionStats {
10 /// unsigned long long bytesSent;
11 /// unsigned long long packetsSent;
12 /// unsigned long long bytesLost;
13 /// unsigned long long packetsLost;
14 /// unsigned long long bytesReceived;
15 /// unsigned long long packetsReceived;
16 /// DOMHighResTimeStamp smoothedRtt;
17 /// DOMHighResTimeStamp rttVariation;
18 /// DOMHighResTimeStamp minRtt;
19 /// WebTransportDatagramStats datagrams;
20 /// unsigned long long? estimatedSendRate;
21 /// };
22 /// ```
23 ///
24 /// <https://w3c.github.io/webtransport/#web-transport-connection-stats>
25 pub type WebTransportConnectionStats {
26 bytes_sent: u16 => bytesSent
27 packets_sent: u16 => packetsSent
28 bytes_lost: u16 => bytesLost
29 packets_lost: u16 => packetsLost
30 bytes_received: u16 => bytesReceived
31 packets_received: u16 => packetsReceived
32 smoothed_rtt: DOMHighResTimeStamp => smoothedRtt
33 rtt_variation: DOMHighResTimeStamp => rttVariation
34 min_rtt: DOMHighResTimeStamp => minRtt
35 datagrams: WebTransportDatagramStats => datagrams
36 estimated_send_rate: u16 => estimatedSendRate
37 }
38}
39
40/// typedef double DOMHighResTimeStamp;
41type DOMHighResTimeStamp = f64;