diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/web-sys/src/features/gen_RtcIceCandidatePairStats.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/web-sys/src/features/gen_RtcIceCandidatePairStats.rs')
-rw-r--r-- | vendor/web-sys/src/features/gen_RtcIceCandidatePairStats.rs | 306 |
1 files changed, 306 insertions, 0 deletions
diff --git a/vendor/web-sys/src/features/gen_RtcIceCandidatePairStats.rs b/vendor/web-sys/src/features/gen_RtcIceCandidatePairStats.rs new file mode 100644 index 000000000..8fa447ae8 --- /dev/null +++ b/vendor/web-sys/src/features/gen_RtcIceCandidatePairStats.rs @@ -0,0 +1,306 @@ +#![allow(unused_imports)] +use super::*; +use wasm_bindgen::prelude::*; +#[wasm_bindgen] +extern "C" { + # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCIceCandidatePairStats)] + #[derive(Debug, Clone, PartialEq, Eq)] + #[doc = "The `RtcIceCandidatePairStats` dictionary."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub type RtcIceCandidatePairStats; +} +impl RtcIceCandidatePairStats { + #[doc = "Construct a new `RtcIceCandidatePairStats`."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn new() -> Self { + #[allow(unused_mut)] + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); + ret + } + #[doc = "Change the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn id(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("id"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn timestamp(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("timestamp"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[cfg(feature = "RtcStatsType")] + #[doc = "Change the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] + pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn bytes_received(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("bytesReceived"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn bytes_sent(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("bytesSent"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn component_id(&mut self, val: u32) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("componentId"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn last_packet_received_timestamp(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("lastPacketReceivedTimestamp"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `lastPacketSentTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn last_packet_sent_timestamp(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("lastPacketSentTimestamp"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `localCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn local_candidate_id(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("localCandidateId"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `nominated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn nominated(&mut self, val: bool) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("nominated"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn priority(&mut self, val: f64) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("priority"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn readable(&mut self, val: bool) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("readable"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `remoteCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn remote_candidate_id(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("remoteCandidateId"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `selected` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn selected(&mut self, val: bool) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("selected"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[cfg(feature = "RtcStatsIceCandidatePairState")] + #[doc = "Change the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] + pub fn state(&mut self, val: RtcStatsIceCandidatePairState) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("state"), &JsValue::from(val)); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn transport_id(&mut self, val: &str) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("transportId"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } + #[doc = "Change the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + pub fn writable(&mut self, val: bool) -> &mut Self { + use wasm_bindgen::JsValue; + let r = ::js_sys::Reflect::set( + self.as_ref(), + &JsValue::from("writable"), + &JsValue::from(val), + ); + debug_assert!( + r.is_ok(), + "setting properties should never fail on our dictionary objects" + ); + let _ = r; + self + } +} +impl Default for RtcIceCandidatePairStats { + fn default() -> Self { + Self::new() + } +} |