1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = RTCDataChannel , typescript_type = "RTCDataChannel")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcDataChannel` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub type RtcDataChannel;
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = label)]
#[doc = "Getter for the `label` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/label)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn label(this: &RtcDataChannel) -> String;
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = id)]
#[doc = "Getter for the `id` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/id)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn id(this: &RtcDataChannel) -> Option<u16>;
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = reliable)]
#[doc = "Getter for the `reliable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/reliable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn reliable(this: &RtcDataChannel) -> bool;
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = maxPacketLifeTime)]
#[doc = "Getter for the `maxPacketLifeTime` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/maxPacketLifeTime)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn max_packet_life_time(this: &RtcDataChannel) -> Option<u16>;
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = maxRetransmits)]
#[doc = "Getter for the `maxRetransmits` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/maxRetransmits)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn max_retransmits(this: &RtcDataChannel) -> Option<u16>;
#[cfg(feature = "RtcDataChannelState")]
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = readyState)]
#[doc = "Getter for the `readyState` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/readyState)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelState`*"]
pub fn ready_state(this: &RtcDataChannel) -> RtcDataChannelState;
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = bufferedAmount)]
#[doc = "Getter for the `bufferedAmount` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/bufferedAmount)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn buffered_amount(this: &RtcDataChannel) -> u32;
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = bufferedAmountLowThreshold)]
#[doc = "Getter for the `bufferedAmountLowThreshold` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/bufferedAmountLowThreshold)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn buffered_amount_low_threshold(this: &RtcDataChannel) -> u32;
# [wasm_bindgen (structural , method , setter , js_class = "RTCDataChannel" , js_name = bufferedAmountLowThreshold)]
#[doc = "Setter for the `bufferedAmountLowThreshold` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/bufferedAmountLowThreshold)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn set_buffered_amount_low_threshold(this: &RtcDataChannel, value: u32);
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = onopen)]
#[doc = "Getter for the `onopen` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onopen)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn onopen(this: &RtcDataChannel) -> Option<::js_sys::Function>;
# [wasm_bindgen (structural , method , setter , js_class = "RTCDataChannel" , js_name = onopen)]
#[doc = "Setter for the `onopen` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onopen)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn set_onopen(this: &RtcDataChannel, value: Option<&::js_sys::Function>);
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = onerror)]
#[doc = "Getter for the `onerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn onerror(this: &RtcDataChannel) -> Option<::js_sys::Function>;
# [wasm_bindgen (structural , method , setter , js_class = "RTCDataChannel" , js_name = onerror)]
#[doc = "Setter for the `onerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn set_onerror(this: &RtcDataChannel, value: Option<&::js_sys::Function>);
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = onclose)]
#[doc = "Getter for the `onclose` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onclose)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn onclose(this: &RtcDataChannel) -> Option<::js_sys::Function>;
# [wasm_bindgen (structural , method , setter , js_class = "RTCDataChannel" , js_name = onclose)]
#[doc = "Setter for the `onclose` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onclose)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn set_onclose(this: &RtcDataChannel, value: Option<&::js_sys::Function>);
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = onmessage)]
#[doc = "Getter for the `onmessage` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onmessage)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn onmessage(this: &RtcDataChannel) -> Option<::js_sys::Function>;
# [wasm_bindgen (structural , method , setter , js_class = "RTCDataChannel" , js_name = onmessage)]
#[doc = "Setter for the `onmessage` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onmessage)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn set_onmessage(this: &RtcDataChannel, value: Option<&::js_sys::Function>);
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = onbufferedamountlow)]
#[doc = "Getter for the `onbufferedamountlow` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onbufferedamountlow)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn onbufferedamountlow(this: &RtcDataChannel) -> Option<::js_sys::Function>;
# [wasm_bindgen (structural , method , setter , js_class = "RTCDataChannel" , js_name = onbufferedamountlow)]
#[doc = "Setter for the `onbufferedamountlow` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/onbufferedamountlow)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn set_onbufferedamountlow(this: &RtcDataChannel, value: Option<&::js_sys::Function>);
#[cfg(feature = "RtcDataChannelType")]
# [wasm_bindgen (structural , method , getter , js_class = "RTCDataChannel" , js_name = binaryType)]
#[doc = "Getter for the `binaryType` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/binaryType)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelType`*"]
pub fn binary_type(this: &RtcDataChannel) -> RtcDataChannelType;
#[cfg(feature = "RtcDataChannelType")]
# [wasm_bindgen (structural , method , setter , js_class = "RTCDataChannel" , js_name = binaryType)]
#[doc = "Setter for the `binaryType` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/binaryType)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelType`*"]
pub fn set_binary_type(this: &RtcDataChannel, value: RtcDataChannelType);
# [wasm_bindgen (method , structural , js_class = "RTCDataChannel" , js_name = close)]
#[doc = "The `close()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/close)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn close(this: &RtcDataChannel);
# [wasm_bindgen (catch , method , structural , js_class = "RTCDataChannel" , js_name = send)]
#[doc = "The `send()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/send)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn send_with_str(this: &RtcDataChannel, data: &str) -> Result<(), JsValue>;
#[cfg(feature = "Blob")]
# [wasm_bindgen (catch , method , structural , js_class = "RTCDataChannel" , js_name = send)]
#[doc = "The `send()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/send)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `Blob`, `RtcDataChannel`*"]
pub fn send_with_blob(this: &RtcDataChannel, data: &Blob) -> Result<(), JsValue>;
# [wasm_bindgen (catch , method , structural , js_class = "RTCDataChannel" , js_name = send)]
#[doc = "The `send()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/send)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn send_with_array_buffer(
this: &RtcDataChannel,
data: &::js_sys::ArrayBuffer,
) -> Result<(), JsValue>;
# [wasm_bindgen (catch , method , structural , js_class = "RTCDataChannel" , js_name = send)]
#[doc = "The `send()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/send)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn send_with_array_buffer_view(
this: &RtcDataChannel,
data: &::js_sys::Object,
) -> Result<(), JsValue>;
# [wasm_bindgen (catch , method , structural , js_class = "RTCDataChannel" , js_name = send)]
#[doc = "The `send()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/send)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`*"]
pub fn send_with_u8_array(this: &RtcDataChannel, data: &[u8]) -> Result<(), JsValue>;
}
|