web_sys/features/
gen_SerialInputSignals.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = SerialInputSignals)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `SerialInputSignals` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type SerialInputSignals;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `clearToSend` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "clearToSend")]
25 pub fn get_clear_to_send(this: &SerialInputSignals) -> bool;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `clearToSend` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "clearToSend")]
34 pub fn set_clear_to_send(this: &SerialInputSignals, val: bool);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `dataCarrierDetect` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "dataCarrierDetect")]
43 pub fn get_data_carrier_detect(this: &SerialInputSignals) -> bool;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `dataCarrierDetect` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "dataCarrierDetect")]
52 pub fn set_data_carrier_detect(this: &SerialInputSignals, val: bool);
53 #[cfg(web_sys_unstable_apis)]
54 #[doc = "Get the `dataSetReady` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
57 #[doc = ""]
58 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
60 #[wasm_bindgen(method, getter = "dataSetReady")]
61 pub fn get_data_set_ready(this: &SerialInputSignals) -> bool;
62 #[cfg(web_sys_unstable_apis)]
63 #[doc = "Change the `dataSetReady` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
66 #[doc = ""]
67 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
69 #[wasm_bindgen(method, setter = "dataSetReady")]
70 pub fn set_data_set_ready(this: &SerialInputSignals, val: bool);
71 #[cfg(web_sys_unstable_apis)]
72 #[doc = "Get the `ringIndicator` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
75 #[doc = ""]
76 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
78 #[wasm_bindgen(method, getter = "ringIndicator")]
79 pub fn get_ring_indicator(this: &SerialInputSignals) -> bool;
80 #[cfg(web_sys_unstable_apis)]
81 #[doc = "Change the `ringIndicator` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
84 #[doc = ""]
85 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
86 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
87 #[wasm_bindgen(method, setter = "ringIndicator")]
88 pub fn set_ring_indicator(this: &SerialInputSignals, val: bool);
89}
90#[cfg(web_sys_unstable_apis)]
91impl SerialInputSignals {
92 #[doc = "Construct a new `SerialInputSignals`."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 pub fn new(
99 clear_to_send: bool,
100 data_carrier_detect: bool,
101 data_set_ready: bool,
102 ring_indicator: bool,
103 ) -> Self {
104 #[allow(unused_mut)]
105 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
106 ret.set_clear_to_send(clear_to_send);
107 ret.set_data_carrier_detect(data_carrier_detect);
108 ret.set_data_set_ready(data_set_ready);
109 ret.set_ring_indicator(ring_indicator);
110 ret
111 }
112 #[cfg(web_sys_unstable_apis)]
113 #[deprecated = "Use `set_clear_to_send()` instead."]
114 pub fn clear_to_send(&mut self, val: bool) -> &mut Self {
115 self.set_clear_to_send(val);
116 self
117 }
118 #[cfg(web_sys_unstable_apis)]
119 #[deprecated = "Use `set_data_carrier_detect()` instead."]
120 pub fn data_carrier_detect(&mut self, val: bool) -> &mut Self {
121 self.set_data_carrier_detect(val);
122 self
123 }
124 #[cfg(web_sys_unstable_apis)]
125 #[deprecated = "Use `set_data_set_ready()` instead."]
126 pub fn data_set_ready(&mut self, val: bool) -> &mut Self {
127 self.set_data_set_ready(val);
128 self
129 }
130 #[cfg(web_sys_unstable_apis)]
131 #[deprecated = "Use `set_ring_indicator()` instead."]
132 pub fn ring_indicator(&mut self, val: bool) -> &mut Self {
133 self.set_ring_indicator(val);
134 self
135 }
136}