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}
41impl IdbOpenDbOptions {
42 #[doc = "Construct a new `IdbOpenDbOptions`."]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"]
45 #[deprecated]
46 pub fn new() -> Self {
47 #[allow(unused_mut)]
48 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
49 ret
50 }
51 #[cfg(feature = "StorageType")]
52 #[deprecated = "Use `set_storage()` instead."]
53 pub fn storage(&mut self, val: StorageType) -> &mut Self {
54 self.set_storage(val);
55 self
56 }
57 #[deprecated = "Use `set_version()` instead."]
58 pub fn version(&mut self, val: f64) -> &mut Self {
59 self.set_version(val);
60 self
61 }
62}
63impl Default for IdbOpenDbOptions {
64 fn default() -> Self {
65 Self::new()
66 }
67}