maxcountryman_web_sys/features/
gen_RtcSessionDescription.rs

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