Skip to main content

web_sys/features/
gen_RtcIceCandidate.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 = "RTCIceCandidate",
10        typescript_type = "RTCIceCandidate"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `RtcIceCandidate` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
18    pub type RtcIceCandidate;
19    #[wasm_bindgen(method, getter, js_class = "RTCIceCandidate", js_name = "candidate")]
20    #[doc = "Getter for the `candidate` field of this object."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/candidate)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
25    pub fn candidate(this: &RtcIceCandidate) -> ::alloc::string::String;
26    #[wasm_bindgen(method, setter, js_class = "RTCIceCandidate", js_name = "candidate")]
27    #[doc = "Setter for the `candidate` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/candidate)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
32    pub fn set_candidate(this: &RtcIceCandidate, value: &str);
33    #[wasm_bindgen(method, getter, js_class = "RTCIceCandidate", js_name = "sdpMid")]
34    #[doc = "Getter for the `sdpMid` field of this object."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/sdpMid)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
39    pub fn sdp_mid(this: &RtcIceCandidate) -> Option<::alloc::string::String>;
40    #[wasm_bindgen(method, setter, js_class = "RTCIceCandidate", js_name = "sdpMid")]
41    #[doc = "Setter for the `sdpMid` field of this object."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/sdpMid)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
46    pub fn set_sdp_mid(this: &RtcIceCandidate, value: Option<&str>);
47    #[wasm_bindgen(
48        method,
49        getter,
50        js_class = "RTCIceCandidate",
51        js_name = "sdpMLineIndex"
52    )]
53    #[doc = "Getter for the `sdpMLineIndex` field of this object."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/sdpMLineIndex)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
58    pub fn sdp_m_line_index(this: &RtcIceCandidate) -> Option<u16>;
59    #[wasm_bindgen(
60        method,
61        setter,
62        js_class = "RTCIceCandidate",
63        js_name = "sdpMLineIndex"
64    )]
65    #[doc = "Setter for the `sdpMLineIndex` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/sdpMLineIndex)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
70    pub fn set_sdp_m_line_index(this: &RtcIceCandidate, value: Option<u16>);
71    #[cfg(feature = "RtcIceCandidateInit")]
72    #[wasm_bindgen(catch, constructor, js_class = "RTCIceCandidate")]
73    #[doc = "The `new RtcIceCandidate(..)` constructor, creating a new instance of `RtcIceCandidate`."]
74    #[doc = ""]
75    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/RTCIceCandidate)"]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcIceCandidateInit`*"]
78    pub fn new(candidate_init_dict: &RtcIceCandidateInit) -> Result<RtcIceCandidate, JsValue>;
79    #[wasm_bindgen(method, js_class = "RTCIceCandidate", js_name = "toJSON")]
80    #[doc = "The `toJSON()` method."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate/toJSON)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`*"]
85    pub fn to_json(this: &RtcIceCandidate) -> ::js_sys::Object;
86}