1#![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}
14impl UnderlyingSink {
15 #[doc = "Construct a new `UnderlyingSink`."]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
18 pub fn new() -> Self {
19 #[allow(unused_mut)]
20 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
21 ret
22 }
23 #[doc = "Change the `abort` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
26 pub fn abort(&mut self, val: &::js_sys::Function) -> &mut Self {
27 use wasm_bindgen::JsValue;
28 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("abort"), &JsValue::from(val));
29 debug_assert!(
30 r.is_ok(),
31 "setting properties should never fail on our dictionary objects"
32 );
33 let _ = r;
34 self
35 }
36 #[doc = "Change the `close` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
39 pub fn close(&mut self, val: &::js_sys::Function) -> &mut Self {
40 use wasm_bindgen::JsValue;
41 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("close"), &JsValue::from(val));
42 debug_assert!(
43 r.is_ok(),
44 "setting properties should never fail on our dictionary objects"
45 );
46 let _ = r;
47 self
48 }
49 #[doc = "Change the `start` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
52 pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self {
53 use wasm_bindgen::JsValue;
54 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("start"), &JsValue::from(val));
55 debug_assert!(
56 r.is_ok(),
57 "setting properties should never fail on our dictionary objects"
58 );
59 let _ = r;
60 self
61 }
62 #[doc = "Change the `type` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
65 pub fn type_(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
66 use wasm_bindgen::JsValue;
67 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
68 debug_assert!(
69 r.is_ok(),
70 "setting properties should never fail on our dictionary objects"
71 );
72 let _ = r;
73 self
74 }
75 #[doc = "Change the `write` field of this object."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"]
78 pub fn write(&mut self, val: &::js_sys::Function) -> &mut Self {
79 use wasm_bindgen::JsValue;
80 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("write"), &JsValue::from(val));
81 debug_assert!(
82 r.is_ok(),
83 "setting properties should never fail on our dictionary objects"
84 );
85 let _ = r;
86 self
87 }
88}
89impl Default for UnderlyingSink {
90 fn default() -> Self {
91 Self::new()
92 }
93}
94