web_sys/features/
gen_QueryOptions.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = QueryOptions)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `QueryOptions` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type QueryOptions;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `postscriptNames` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "postscriptNames")]
25 pub fn get_postscript_names(this: &QueryOptions)
26 -> Option<::js_sys::Array<::js_sys::JsString>>;
27 #[cfg(web_sys_unstable_apis)]
28 #[doc = "Change the `postscriptNames` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"]
31 #[doc = ""]
32 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34 #[wasm_bindgen(method, setter = "postscriptNames")]
35 pub fn set_postscript_names(this: &QueryOptions, val: &[::js_sys::JsString]);
36}
37#[cfg(web_sys_unstable_apis)]
38impl QueryOptions {
39 #[doc = "Construct a new `QueryOptions`."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"]
42 #[doc = ""]
43 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45 pub fn new() -> Self {
46 #[allow(unused_mut)]
47 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
48 ret
49 }
50 #[cfg(web_sys_unstable_apis)]
51 #[deprecated = "Use `set_postscript_names()` instead."]
52 pub fn postscript_names(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
53 self.set_postscript_names(val);
54 self
55 }
56}
57#[cfg(web_sys_unstable_apis)]
58impl Default for QueryOptions {
59 fn default() -> Self {
60 Self::new()
61 }
62}