web_sys/features/
gen_IdbIndexParameters.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 = IDBIndexParameters)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `IdbIndexParameters` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
12 pub type IdbIndexParameters;
13 #[doc = "Get the `locale` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
16 #[deprecated]
17 #[wasm_bindgen(method, getter = "locale")]
18 pub fn get_locale(this: &IdbIndexParameters) -> Option<::alloc::string::String>;
19 #[doc = "Change the `locale` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
22 #[deprecated]
23 #[wasm_bindgen(method, setter = "locale")]
24 pub fn set_locale(this: &IdbIndexParameters, val: Option<&str>);
25 #[doc = "Get the `multiEntry` field of this object."]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
28 #[wasm_bindgen(method, getter = "multiEntry")]
29 pub fn get_multi_entry(this: &IdbIndexParameters) -> Option<bool>;
30 #[doc = "Change the `multiEntry` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
33 #[wasm_bindgen(method, setter = "multiEntry")]
34 pub fn set_multi_entry(this: &IdbIndexParameters, val: bool);
35 #[doc = "Get the `unique` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
38 #[wasm_bindgen(method, getter = "unique")]
39 pub fn get_unique(this: &IdbIndexParameters) -> Option<bool>;
40 #[doc = "Change the `unique` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
43 #[wasm_bindgen(method, setter = "unique")]
44 pub fn set_unique(this: &IdbIndexParameters, val: bool);
45}
46impl IdbIndexParameters {
47 #[doc = "Construct a new `IdbIndexParameters`."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"]
50 pub fn new() -> Self {
51 #[allow(unused_mut)]
52 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
53 ret
54 }
55 #[deprecated = "Use `set_locale()` instead."]
56 pub fn locale(&mut self, val: Option<&str>) -> &mut Self {
57 self.set_locale(val);
58 self
59 }
60 #[deprecated = "Use `set_multi_entry()` instead."]
61 pub fn multi_entry(&mut self, val: bool) -> &mut Self {
62 self.set_multi_entry(val);
63 self
64 }
65 #[deprecated = "Use `set_unique()` instead."]
66 pub fn unique(&mut self, val: bool) -> &mut Self {
67 self.set_unique(val);
68 self
69 }
70}
71impl Default for IdbIndexParameters {
72 fn default() -> Self {
73 Self::new()
74 }
75}