web_sys/features/
gen_HttpConnectionElement.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = HttpConnectionElement)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `HttpConnectionElement` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
12 pub type HttpConnectionElement;
13 #[doc = "Get the `active` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
16 #[wasm_bindgen(method, getter = "active")]
17 pub fn get_active(this: &HttpConnectionElement) -> Option<::js_sys::Array>;
18 #[doc = "Change the `active` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
21 #[wasm_bindgen(method, setter = "active")]
22 pub fn set_active(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue);
23 #[doc = "Get the `halfOpens` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
26 #[wasm_bindgen(method, getter = "halfOpens")]
27 pub fn get_half_opens(this: &HttpConnectionElement) -> Option<::js_sys::Array>;
28 #[doc = "Change the `halfOpens` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
31 #[wasm_bindgen(method, setter = "halfOpens")]
32 pub fn set_half_opens(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue);
33 #[doc = "Get the `host` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
36 #[wasm_bindgen(method, getter = "host")]
37 pub fn get_host(this: &HttpConnectionElement) -> Option<::alloc::string::String>;
38 #[doc = "Change the `host` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
41 #[wasm_bindgen(method, setter = "host")]
42 pub fn set_host(this: &HttpConnectionElement, val: &str);
43 #[doc = "Get the `idle` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
46 #[wasm_bindgen(method, getter = "idle")]
47 pub fn get_idle(this: &HttpConnectionElement) -> Option<::js_sys::Array>;
48 #[doc = "Change the `idle` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
51 #[wasm_bindgen(method, setter = "idle")]
52 pub fn set_idle(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue);
53 #[doc = "Get the `port` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
56 #[wasm_bindgen(method, getter = "port")]
57 pub fn get_port(this: &HttpConnectionElement) -> Option<u32>;
58 #[doc = "Change the `port` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
61 #[wasm_bindgen(method, setter = "port")]
62 pub fn set_port(this: &HttpConnectionElement, val: u32);
63 #[doc = "Get the `spdy` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
66 #[wasm_bindgen(method, getter = "spdy")]
67 pub fn get_spdy(this: &HttpConnectionElement) -> Option<bool>;
68 #[doc = "Change the `spdy` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
71 #[wasm_bindgen(method, setter = "spdy")]
72 pub fn set_spdy(this: &HttpConnectionElement, val: bool);
73 #[doc = "Get the `ssl` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
76 #[wasm_bindgen(method, getter = "ssl")]
77 pub fn get_ssl(this: &HttpConnectionElement) -> Option<bool>;
78 #[doc = "Change the `ssl` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
81 #[wasm_bindgen(method, setter = "ssl")]
82 pub fn set_ssl(this: &HttpConnectionElement, val: bool);
83}
84impl HttpConnectionElement {
85 #[doc = "Construct a new `HttpConnectionElement`."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"]
88 pub fn new() -> Self {
89 #[allow(unused_mut)]
90 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
91 ret
92 }
93 #[deprecated = "Use `set_active()` instead."]
94 pub fn active(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
95 self.set_active(val);
96 self
97 }
98 #[deprecated = "Use `set_half_opens()` instead."]
99 pub fn half_opens(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
100 self.set_half_opens(val);
101 self
102 }
103 #[deprecated = "Use `set_host()` instead."]
104 pub fn host(&mut self, val: &str) -> &mut Self {
105 self.set_host(val);
106 self
107 }
108 #[deprecated = "Use `set_idle()` instead."]
109 pub fn idle(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
110 self.set_idle(val);
111 self
112 }
113 #[deprecated = "Use `set_port()` instead."]
114 pub fn port(&mut self, val: u32) -> &mut Self {
115 self.set_port(val);
116 self
117 }
118 #[deprecated = "Use `set_spdy()` instead."]
119 pub fn spdy(&mut self, val: bool) -> &mut Self {
120 self.set_spdy(val);
121 self
122 }
123 #[deprecated = "Use `set_ssl()` instead."]
124 pub fn ssl(&mut self, val: bool) -> &mut Self {
125 self.set_ssl(val);
126 self
127 }
128}
129impl Default for HttpConnectionElement {
130 fn default() -> Self {
131 Self::new()
132 }
133}