web_sys/features/
gen_FilePickerAcceptType.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 = FilePickerAcceptType)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `FilePickerAcceptType` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"]
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 FilePickerAcceptType;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `accept` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"]
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 = "accept")]
25 pub fn get_accept(this: &FilePickerAcceptType) -> Option<::js_sys::Object>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `accept` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "accept")]
34 pub fn set_accept(this: &FilePickerAcceptType, val: &::js_sys::Object<::js_sys::JsString>);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Change the `accept` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, setter = "accept")]
43 pub fn set_accept_record_from_str_to_str_sequence(
44 this: &FilePickerAcceptType,
45 val: &::js_sys::Object<::js_sys::Array<::js_sys::JsString>>,
46 );
47 #[cfg(web_sys_unstable_apis)]
48 #[doc = "Get the `description` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"]
51 #[doc = ""]
52 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54 #[wasm_bindgen(method, getter = "description")]
55 pub fn get_description(this: &FilePickerAcceptType) -> Option<::alloc::string::String>;
56 #[cfg(web_sys_unstable_apis)]
57 #[doc = "Change the `description` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 #[wasm_bindgen(method, setter = "description")]
64 pub fn set_description(this: &FilePickerAcceptType, val: &str);
65}
66#[cfg(web_sys_unstable_apis)]
67impl FilePickerAcceptType {
68 #[doc = "Construct a new `FilePickerAcceptType`."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"]
71 #[doc = ""]
72 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
74 pub fn new() -> Self {
75 #[allow(unused_mut)]
76 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
77 ret
78 }
79 #[cfg(web_sys_unstable_apis)]
80 #[deprecated = "Use `set_accept()` instead."]
81 pub fn accept(&mut self, val: &::js_sys::Object<::js_sys::JsString>) -> &mut Self {
82 self.set_accept(val);
83 self
84 }
85 #[cfg(web_sys_unstable_apis)]
86 #[deprecated = "Use `set_description()` instead."]
87 pub fn description(&mut self, val: &str) -> &mut Self {
88 self.set_description(val);
89 self
90 }
91}
92#[cfg(web_sys_unstable_apis)]
93impl Default for FilePickerAcceptType {
94 fn default() -> Self {
95 Self::new()
96 }
97}