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