web_sys/features/
gen_UnderlyingSink.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 = UnderlyingSink)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `UnderlyingSink` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
12 pub type UnderlyingSink;
13 #[doc = "Get the `abort` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
16 #[wasm_bindgen(method, getter = "abort")]
17 pub fn get_abort(this: &UnderlyingSink) -> Option<::js_sys::Function>;
18 #[doc = "Change the `abort` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
21 #[wasm_bindgen(method, setter = "abort")]
22 pub fn set_abort(this: &UnderlyingSink, val: &::js_sys::Function);
23 #[doc = "Get the `close` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
26 #[wasm_bindgen(method, getter = "close")]
27 pub fn get_close(this: &UnderlyingSink) -> Option<::js_sys::Function>;
28 #[doc = "Change the `close` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
31 #[wasm_bindgen(method, setter = "close")]
32 pub fn set_close(this: &UnderlyingSink, val: &::js_sys::Function);
33 #[doc = "Get the `start` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
36 #[wasm_bindgen(method, getter = "start")]
37 pub fn get_start(this: &UnderlyingSink) -> Option<::js_sys::Function>;
38 #[doc = "Change the `start` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
41 #[wasm_bindgen(method, setter = "start")]
42 pub fn set_start(this: &UnderlyingSink, val: &::js_sys::Function);
43 #[doc = "Get the `type` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
46 #[wasm_bindgen(method, getter = "type")]
47 pub fn get_type(this: &UnderlyingSink) -> ::wasm_bindgen::JsValue;
48 #[doc = "Change the `type` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
51 #[wasm_bindgen(method, setter = "type")]
52 pub fn set_type(this: &UnderlyingSink, val: &::wasm_bindgen::JsValue);
53 #[doc = "Get the `write` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
56 #[wasm_bindgen(method, getter = "write")]
57 pub fn get_write(this: &UnderlyingSink) -> Option<::js_sys::Function>;
58 #[doc = "Change the `write` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
61 #[wasm_bindgen(method, setter = "write")]
62 pub fn set_write(this: &UnderlyingSink, val: &::js_sys::Function);
63}
64impl UnderlyingSink {
65 #[doc = "Construct a new `UnderlyingSink`."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
68 pub fn new() -> Self {
69 #[allow(unused_mut)]
70 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
71 ret
72 }
73 #[deprecated = "Use `set_abort()` instead."]
74 pub fn abort(&mut self, val: &::js_sys::Function) -> &mut Self {
75 self.set_abort(val);
76 self
77 }
78 #[deprecated = "Use `set_close()` instead."]
79 pub fn close(&mut self, val: &::js_sys::Function) -> &mut Self {
80 self.set_close(val);
81 self
82 }
83 #[deprecated = "Use `set_start()` instead."]
84 pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self {
85 self.set_start(val);
86 self
87 }
88 #[deprecated = "Use `set_type()` instead."]
89 pub fn type_(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
90 self.set_type(val);
91 self
92 }
93 #[deprecated = "Use `set_write()` instead."]
94 pub fn write(&mut self, val: &::js_sys::Function) -> &mut Self {
95 self.set_write(val);
96 self
97 }
98}
99impl Default for UnderlyingSink {
100 fn default() -> Self {
101 Self::new()
102 }
103}