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