Skip to main content

web_sys/features/
gen_RtcRtpHeaderExtensionParameters.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "RTCRtpHeaderExtensionParameters"
10    )]
11    #[derive(Debug, Clone, PartialEq, Eq)]
12    #[doc = "The `RtcRtpHeaderExtensionParameters` dictionary."]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
15    pub type RtcRtpHeaderExtensionParameters;
16    #[doc = "Get the `encrypted` field of this object."]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
19    #[wasm_bindgen(method, getter = "encrypted")]
20    pub fn get_encrypted(this: &RtcRtpHeaderExtensionParameters) -> Option<bool>;
21    #[doc = "Change the `encrypted` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
24    #[wasm_bindgen(method, setter = "encrypted")]
25    pub fn set_encrypted(this: &RtcRtpHeaderExtensionParameters, val: bool);
26    #[doc = "Get the `id` field of this object."]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
29    #[wasm_bindgen(method, getter = "id")]
30    pub fn get_id(this: &RtcRtpHeaderExtensionParameters) -> Option<u16>;
31    #[doc = "Change the `id` field of this object."]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
34    #[wasm_bindgen(method, setter = "id")]
35    pub fn set_id(this: &RtcRtpHeaderExtensionParameters, val: u16);
36    #[doc = "Get the `uri` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
39    #[wasm_bindgen(method, getter = "uri")]
40    pub fn get_uri(this: &RtcRtpHeaderExtensionParameters) -> Option<::alloc::string::String>;
41    #[doc = "Change the `uri` field of this object."]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
44    #[wasm_bindgen(method, setter = "uri")]
45    pub fn set_uri(this: &RtcRtpHeaderExtensionParameters, val: &str);
46}
47impl RtcRtpHeaderExtensionParameters {
48    #[doc = "Construct a new `RtcRtpHeaderExtensionParameters`."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"]
51    pub fn new() -> Self {
52        #[allow(unused_mut)]
53        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
54        ret
55    }
56    #[deprecated = "Use `set_encrypted()` instead."]
57    pub fn encrypted(&mut self, val: bool) -> &mut Self {
58        self.set_encrypted(val);
59        self
60    }
61    #[deprecated = "Use `set_id()` instead."]
62    pub fn id(&mut self, val: u16) -> &mut Self {
63        self.set_id(val);
64        self
65    }
66    #[deprecated = "Use `set_uri()` instead."]
67    pub fn uri(&mut self, val: &str) -> &mut Self {
68        self.set_uri(val);
69        self
70    }
71}
72impl Default for RtcRtpHeaderExtensionParameters {
73    fn default() -> Self {
74        Self::new()
75    }
76}