Skip to main content

web_sys/features/
gen_PresentationConnection.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 = "EventTarget",
9        extends = "::js_sys::Object",
10        js_name = "PresentationConnection",
11        typescript_type = "PresentationConnection"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `PresentationConnection` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
19    pub type PresentationConnection;
20    #[wasm_bindgen(method, getter, js_class = "PresentationConnection", js_name = "id")]
21    #[doc = "Getter for the `id` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/id)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
26    pub fn id(this: &PresentationConnection) -> ::alloc::string::String;
27    #[wasm_bindgen(method, getter, js_class = "PresentationConnection", js_name = "url")]
28    #[doc = "Getter for the `url` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/url)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
33    pub fn url(this: &PresentationConnection) -> ::alloc::string::String;
34    #[cfg(feature = "PresentationConnectionState")]
35    #[wasm_bindgen(method, getter, js_class = "PresentationConnection", js_name = "state")]
36    #[doc = "Getter for the `state` field of this object."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/state)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionState`*"]
41    pub fn state(this: &PresentationConnection) -> PresentationConnectionState;
42    #[wasm_bindgen(
43        method,
44        getter,
45        js_class = "PresentationConnection",
46        js_name = "onconnect"
47    )]
48    #[doc = "Getter for the `onconnect` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onconnect)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
53    pub fn onconnect(this: &PresentationConnection) -> Option<::js_sys::Function>;
54    #[wasm_bindgen(
55        method,
56        setter,
57        js_class = "PresentationConnection",
58        js_name = "onconnect"
59    )]
60    #[doc = "Setter for the `onconnect` field of this object."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onconnect)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
65    pub fn set_onconnect(this: &PresentationConnection, value: Option<&::js_sys::Function>);
66    #[wasm_bindgen(
67        method,
68        getter,
69        js_class = "PresentationConnection",
70        js_name = "onclose"
71    )]
72    #[doc = "Getter for the `onclose` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onclose)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
77    pub fn onclose(this: &PresentationConnection) -> Option<::js_sys::Function>;
78    #[wasm_bindgen(
79        method,
80        setter,
81        js_class = "PresentationConnection",
82        js_name = "onclose"
83    )]
84    #[doc = "Setter for the `onclose` field of this object."]
85    #[doc = ""]
86    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onclose)"]
87    #[doc = ""]
88    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
89    pub fn set_onclose(this: &PresentationConnection, value: Option<&::js_sys::Function>);
90    #[wasm_bindgen(
91        method,
92        getter,
93        js_class = "PresentationConnection",
94        js_name = "onterminate"
95    )]
96    #[doc = "Getter for the `onterminate` field of this object."]
97    #[doc = ""]
98    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onterminate)"]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
101    pub fn onterminate(this: &PresentationConnection) -> Option<::js_sys::Function>;
102    #[wasm_bindgen(
103        method,
104        setter,
105        js_class = "PresentationConnection",
106        js_name = "onterminate"
107    )]
108    #[doc = "Setter for the `onterminate` field of this object."]
109    #[doc = ""]
110    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onterminate)"]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
113    pub fn set_onterminate(this: &PresentationConnection, value: Option<&::js_sys::Function>);
114    #[cfg(feature = "PresentationConnectionBinaryType")]
115    #[wasm_bindgen(
116        method,
117        getter,
118        js_class = "PresentationConnection",
119        js_name = "binaryType"
120    )]
121    #[doc = "Getter for the `binaryType` field of this object."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/binaryType)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionBinaryType`*"]
126    pub fn binary_type(this: &PresentationConnection) -> PresentationConnectionBinaryType;
127    #[cfg(feature = "PresentationConnectionBinaryType")]
128    #[wasm_bindgen(
129        method,
130        setter,
131        js_class = "PresentationConnection",
132        js_name = "binaryType"
133    )]
134    #[doc = "Setter for the `binaryType` field of this object."]
135    #[doc = ""]
136    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/binaryType)"]
137    #[doc = ""]
138    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionBinaryType`*"]
139    pub fn set_binary_type(this: &PresentationConnection, value: PresentationConnectionBinaryType);
140    #[wasm_bindgen(
141        method,
142        getter,
143        js_class = "PresentationConnection",
144        js_name = "onmessage"
145    )]
146    #[doc = "Getter for the `onmessage` field of this object."]
147    #[doc = ""]
148    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onmessage)"]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
151    pub fn onmessage(this: &PresentationConnection) -> Option<::js_sys::Function>;
152    #[wasm_bindgen(
153        method,
154        setter,
155        js_class = "PresentationConnection",
156        js_name = "onmessage"
157    )]
158    #[doc = "Setter for the `onmessage` field of this object."]
159    #[doc = ""]
160    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/onmessage)"]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
163    pub fn set_onmessage(this: &PresentationConnection, value: Option<&::js_sys::Function>);
164    #[wasm_bindgen(catch, method, js_class = "PresentationConnection")]
165    #[doc = "The `close()` method."]
166    #[doc = ""]
167    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/close)"]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
170    pub fn close(this: &PresentationConnection) -> Result<(), JsValue>;
171    #[wasm_bindgen(catch, method, js_class = "PresentationConnection", js_name = "send")]
172    #[doc = "The `send()` method."]
173    #[doc = ""]
174    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
175    #[doc = ""]
176    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
177    pub fn send_with_str(this: &PresentationConnection, data: &str) -> Result<(), JsValue>;
178    #[cfg(feature = "Blob")]
179    #[wasm_bindgen(catch, method, js_class = "PresentationConnection", js_name = "send")]
180    #[doc = "The `send()` method."]
181    #[doc = ""]
182    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
183    #[doc = ""]
184    #[doc = "*This API requires the following crate features to be activated: `Blob`, `PresentationConnection`*"]
185    pub fn send_with_blob(this: &PresentationConnection, data: &Blob) -> Result<(), JsValue>;
186    #[wasm_bindgen(catch, method, js_class = "PresentationConnection", js_name = "send")]
187    #[doc = "The `send()` method."]
188    #[doc = ""]
189    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
190    #[doc = ""]
191    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
192    pub fn send_with_array_buffer(
193        this: &PresentationConnection,
194        data: &::js_sys::ArrayBuffer,
195    ) -> Result<(), JsValue>;
196    #[wasm_bindgen(catch, method, js_class = "PresentationConnection", js_name = "send")]
197    #[doc = "The `send()` method."]
198    #[doc = ""]
199    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
200    #[doc = ""]
201    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
202    pub fn send_with_array_buffer_view(
203        this: &PresentationConnection,
204        data: &::js_sys::Object,
205    ) -> Result<(), JsValue>;
206    #[wasm_bindgen(catch, method, js_class = "PresentationConnection", js_name = "send")]
207    #[doc = "The `send()` method."]
208    #[doc = ""]
209    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
210    #[doc = ""]
211    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
212    pub fn send_with_u8_array(this: &PresentationConnection, data: &[u8]) -> Result<(), JsValue>;
213    #[wasm_bindgen(catch, method, js_class = "PresentationConnection", js_name = "send")]
214    #[doc = "The `send()` method."]
215    #[doc = ""]
216    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/send)"]
217    #[doc = ""]
218    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
219    pub fn send_with_js_u8_array(
220        this: &PresentationConnection,
221        data: &::js_sys::Uint8Array,
222    ) -> Result<(), JsValue>;
223    #[wasm_bindgen(catch, method, js_class = "PresentationConnection")]
224    #[doc = "The `terminate()` method."]
225    #[doc = ""]
226    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnection/terminate)"]
227    #[doc = ""]
228    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`*"]
229    pub fn terminate(this: &PresentationConnection) -> Result<(), JsValue>;
230}