web_sys/features/
gen_ClientQueryOptions.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 = ClientQueryOptions)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `ClientQueryOptions` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"]
12    pub type ClientQueryOptions;
13    #[doc = "Get the `includeUncontrolled` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"]
16    #[wasm_bindgen(method, getter = "includeUncontrolled")]
17    pub fn get_include_uncontrolled(this: &ClientQueryOptions) -> Option<bool>;
18    #[doc = "Change the `includeUncontrolled` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"]
21    #[wasm_bindgen(method, setter = "includeUncontrolled")]
22    pub fn set_include_uncontrolled(this: &ClientQueryOptions, val: bool);
23    #[cfg(feature = "ClientType")]
24    #[doc = "Get the `type` field of this object."]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"]
27    #[wasm_bindgen(method, getter = "type")]
28    pub fn get_type(this: &ClientQueryOptions) -> Option<ClientType>;
29    #[cfg(feature = "ClientType")]
30    #[doc = "Change the `type` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"]
33    #[wasm_bindgen(method, setter = "type")]
34    pub fn set_type(this: &ClientQueryOptions, val: ClientType);
35}
36impl ClientQueryOptions {
37    #[doc = "Construct a new `ClientQueryOptions`."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"]
40    pub fn new() -> Self {
41        #[allow(unused_mut)]
42        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
43        ret
44    }
45    #[deprecated = "Use `set_include_uncontrolled()` instead."]
46    pub fn include_uncontrolled(&mut self, val: bool) -> &mut Self {
47        self.set_include_uncontrolled(val);
48        self
49    }
50    #[cfg(feature = "ClientType")]
51    #[deprecated = "Use `set_type()` instead."]
52    pub fn type_(&mut self, val: ClientType) -> &mut Self {
53        self.set_type(val);
54        self
55    }
56}
57impl Default for ClientQueryOptions {
58    fn default() -> Self {
59        Self::new()
60    }
61}