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