web_sys/features/
gen_IdbOpenDbOptions.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 = IDBOpenDBOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `IdbOpenDbOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"]
12 #[deprecated]
13 pub type IdbOpenDbOptions;
14 #[cfg(feature = "StorageType")]
15 #[doc = "Get the `storage` field of this object."]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"]
18 #[deprecated]
19 #[wasm_bindgen(method, getter = "storage")]
20 pub fn get_storage(this: &IdbOpenDbOptions) -> Option<StorageType>;
21 #[cfg(feature = "StorageType")]
22 #[doc = "Change the `storage` field of this object."]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"]
25 #[deprecated]
26 #[wasm_bindgen(method, setter = "storage")]
27 pub fn set_storage(this: &IdbOpenDbOptions, val: StorageType);
28 #[doc = "Get the `version` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"]
31 #[deprecated]
32 #[wasm_bindgen(method, getter = "version")]
33 pub fn get_version(this: &IdbOpenDbOptions) -> Option<f64>;
34 #[doc = "Change the `version` field of this object."]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"]
37 #[deprecated]
38 #[wasm_bindgen(method, setter = "version")]
39 pub fn set_version(this: &IdbOpenDbOptions, val: f64);
40 #[doc = "Change the `version` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"]
43 #[deprecated]
44 #[wasm_bindgen(method, setter = "version")]
45 pub fn set_version_u32(this: &IdbOpenDbOptions, val: u32);
46 #[doc = "Change the `version` field of this object."]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"]
49 #[deprecated]
50 #[wasm_bindgen(method, setter = "version")]
51 pub fn set_version_f64(this: &IdbOpenDbOptions, val: f64);
52}
53impl IdbOpenDbOptions {
54 #[doc = "Construct a new `IdbOpenDbOptions`."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"]
57 #[deprecated]
58 pub fn new() -> Self {
59 #[allow(unused_mut)]
60 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
61 ret
62 }
63 #[cfg(feature = "StorageType")]
64 #[deprecated = "Use `set_storage()` instead."]
65 pub fn storage(&mut self, val: StorageType) -> &mut Self {
66 self.set_storage(val);
67 self
68 }
69 #[deprecated = "Use `set_version()` instead."]
70 pub fn version(&mut self, val: f64) -> &mut Self {
71 self.set_version(val);
72 self
73 }
74}
75impl Default for IdbOpenDbOptions {
76 fn default() -> Self {
77 Self::new()
78 }
79}