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