Skip to main content

web_wt_sys/webtransport/
web_transport_send_group.rs

1//! [`WebTransportSendGroup`]
2//!
3//! <https://w3c.github.io/webtransport/#sendGroup>
4
5use super::*;
6use js_sys::Object;
7use wasm_bindgen::prelude::*;
8
9#[wasm_bindgen]
10extern "C" {
11    /// <https://w3c.github.io/webtransport/#webtransportsendgroup>
12    #[wasm_bindgen(extends = Object)]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    pub type WebTransportSendGroup;
15
16    /// ```webidl
17    /// Promise<WebTransportSendStreamStats> getStats();
18    /// ```
19    ///
20    /// <https://w3c.github.io/webtransport/#dom-webtransportsendgroup-getstats>
21    ///
22    /// Aggregates stats from all WebTransportSendStreams grouped under this
23    /// sendGroup, and reports the result asynchronously.
24    #[wasm_bindgen(method, js_name = getStats)]
25    pub async fn get_stats(this: &WebTransportSendGroup) -> WebTransportSendStreamStats;
26}