Skip to main content

web_sys/features/
gen_RtcSessionDescription.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 = "RTCSessionDescription",
10        typescript_type = "RTCSessionDescription"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `RtcSessionDescription` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescription`*"]
18    pub type RtcSessionDescription;
19    #[cfg(feature = "RtcSdpType")]
20    #[wasm_bindgen(method, getter, js_class = "RTCSessionDescription", js_name = "type")]
21    #[doc = "Getter for the `type` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/type)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescription`*"]
26    pub fn type_(this: &RtcSessionDescription) -> RtcSdpType;
27    #[cfg(feature = "RtcSdpType")]
28    #[wasm_bindgen(method, setter, js_class = "RTCSessionDescription", js_name = "type")]
29    #[doc = "Setter for the `type` field of this object."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/type)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescription`*"]
34    pub fn set_type(this: &RtcSessionDescription, value: RtcSdpType);
35    #[wasm_bindgen(method, getter, js_class = "RTCSessionDescription", js_name = "sdp")]
36    #[doc = "Getter for the `sdp` field of this object."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/sdp)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescription`*"]
41    pub fn sdp(this: &RtcSessionDescription) -> ::alloc::string::String;
42    #[wasm_bindgen(method, setter, js_class = "RTCSessionDescription", js_name = "sdp")]
43    #[doc = "Setter for the `sdp` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/sdp)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescription`*"]
48    pub fn set_sdp(this: &RtcSessionDescription, value: &str);
49    #[wasm_bindgen(catch, constructor, js_class = "RTCSessionDescription")]
50    #[doc = "The `new RtcSessionDescription(..)` constructor, creating a new instance of `RtcSessionDescription`."]
51    #[doc = ""]
52    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/RTCSessionDescription)"]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescription`*"]
55    pub fn new() -> Result<RtcSessionDescription, JsValue>;
56    #[cfg(feature = "RtcSessionDescriptionInit")]
57    #[wasm_bindgen(catch, constructor, js_class = "RTCSessionDescription")]
58    #[doc = "The `new RtcSessionDescription(..)` constructor, creating a new instance of `RtcSessionDescription`."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/RTCSessionDescription)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescription`, `RtcSessionDescriptionInit`*"]
63    pub fn new_with_description_init_dict(
64        description_init_dict: &RtcSessionDescriptionInit,
65    ) -> Result<RtcSessionDescription, JsValue>;
66    #[wasm_bindgen(method, js_class = "RTCSessionDescription", js_name = "toJSON")]
67    #[doc = "The `toJSON()` method."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription/toJSON)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescription`*"]
72    pub fn to_json(this: &RtcSessionDescription) -> ::js_sys::Object;
73}