web_sys/features/
gen_AutocompleteInfo.rs

1#![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 = AutocompleteInfo)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `AutocompleteInfo` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
12    pub type AutocompleteInfo;
13    #[doc = "Get the `addressType` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
16    #[wasm_bindgen(method, getter = "addressType")]
17    pub fn get_address_type(this: &AutocompleteInfo) -> Option<::alloc::string::String>;
18    #[doc = "Change the `addressType` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
21    #[wasm_bindgen(method, setter = "addressType")]
22    pub fn set_address_type(this: &AutocompleteInfo, val: &str);
23    #[doc = "Get the `contactType` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
26    #[wasm_bindgen(method, getter = "contactType")]
27    pub fn get_contact_type(this: &AutocompleteInfo) -> Option<::alloc::string::String>;
28    #[doc = "Change the `contactType` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
31    #[wasm_bindgen(method, setter = "contactType")]
32    pub fn set_contact_type(this: &AutocompleteInfo, val: &str);
33    #[doc = "Get the `fieldName` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
36    #[wasm_bindgen(method, getter = "fieldName")]
37    pub fn get_field_name(this: &AutocompleteInfo) -> Option<::alloc::string::String>;
38    #[doc = "Change the `fieldName` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
41    #[wasm_bindgen(method, setter = "fieldName")]
42    pub fn set_field_name(this: &AutocompleteInfo, val: &str);
43    #[doc = "Get the `section` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
46    #[wasm_bindgen(method, getter = "section")]
47    pub fn get_section(this: &AutocompleteInfo) -> Option<::alloc::string::String>;
48    #[doc = "Change the `section` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
51    #[wasm_bindgen(method, setter = "section")]
52    pub fn set_section(this: &AutocompleteInfo, val: &str);
53}
54impl AutocompleteInfo {
55    #[doc = "Construct a new `AutocompleteInfo`."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"]
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    #[deprecated = "Use `set_address_type()` instead."]
64    pub fn address_type(&mut self, val: &str) -> &mut Self {
65        self.set_address_type(val);
66        self
67    }
68    #[deprecated = "Use `set_contact_type()` instead."]
69    pub fn contact_type(&mut self, val: &str) -> &mut Self {
70        self.set_contact_type(val);
71        self
72    }
73    #[deprecated = "Use `set_field_name()` instead."]
74    pub fn field_name(&mut self, val: &str) -> &mut Self {
75        self.set_field_name(val);
76        self
77    }
78    #[deprecated = "Use `set_section()` instead."]
79    pub fn section(&mut self, val: &str) -> &mut Self {
80        self.set_section(val);
81        self
82    }
83}
84impl Default for AutocompleteInfo {
85    fn default() -> Self {
86        Self::new()
87    }
88}