1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | extern "C" { |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = QueuingStrategy)] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `QueuingStrategy` dictionary." ] |
10 | #[doc = "" ] |
11 | #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*" ] |
12 | pub type QueuingStrategy; |
13 | } |
14 | impl QueuingStrategy { |
15 | #[doc = "Construct a new `QueuingStrategy`." ] |
16 | #[doc = "" ] |
17 | #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*" ] |
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 `highWaterMark` field of this object." ] |
24 | #[doc = "" ] |
25 | #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*" ] |
26 | pub fn high_water_mark(&mut self, val: f64) -> &mut Self { |
27 | use wasm_bindgen::JsValue; |
28 | let r = ::js_sys::Reflect::set( |
29 | self.as_ref(), |
30 | &JsValue::from("highWaterMark" ), |
31 | &JsValue::from(val), |
32 | ); |
33 | debug_assert!( |
34 | r.is_ok(), |
35 | "setting properties should never fail on our dictionary objects" |
36 | ); |
37 | let _ = r; |
38 | self |
39 | } |
40 | #[doc = "Change the `size` field of this object." ] |
41 | #[doc = "" ] |
42 | #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*" ] |
43 | pub fn size(&mut self, val: &::js_sys::Function) -> &mut Self { |
44 | use wasm_bindgen::JsValue; |
45 | let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("size" ), &JsValue::from(val)); |
46 | debug_assert!( |
47 | r.is_ok(), |
48 | "setting properties should never fail on our dictionary objects" |
49 | ); |
50 | let _ = r; |
51 | self |
52 | } |
53 | } |
54 | impl Default for QueuingStrategy { |
55 | fn default() -> Self { |
56 | Self::new() |
57 | } |
58 | } |
59 | |