web_sys/features/
gen_FileSystemHandlePermissionDescriptor.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(
9 extends = "::js_sys::Object",
10 js_name = "FileSystemHandlePermissionDescriptor"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `FileSystemHandlePermissionDescriptor` dictionary."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`*"]
16 #[doc = ""]
17 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19 pub type FileSystemHandlePermissionDescriptor;
20 #[cfg(web_sys_unstable_apis)]
21 #[cfg(feature = "FileSystemPermissionMode")]
22 #[doc = "Get the `mode` field of this object."]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"]
25 #[doc = ""]
26 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
28 #[wasm_bindgen(method, getter = "mode")]
29 pub fn get_mode(
30 this: &FileSystemHandlePermissionDescriptor,
31 ) -> Option<FileSystemPermissionMode>;
32 #[cfg(web_sys_unstable_apis)]
33 #[cfg(feature = "FileSystemPermissionMode")]
34 #[doc = "Change the `mode` field of this object."]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"]
37 #[doc = ""]
38 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
40 #[wasm_bindgen(method, setter = "mode")]
41 pub fn set_mode(this: &FileSystemHandlePermissionDescriptor, val: FileSystemPermissionMode);
42}
43#[cfg(web_sys_unstable_apis)]
44impl FileSystemHandlePermissionDescriptor {
45 #[doc = "Construct a new `FileSystemHandlePermissionDescriptor`."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
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 #[cfg(web_sys_unstable_apis)]
57 #[cfg(feature = "FileSystemPermissionMode")]
58 #[deprecated = "Use `set_mode()` instead."]
59 pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self {
60 self.set_mode(val);
61 self
62 }
63}
64#[cfg(web_sys_unstable_apis)]
65impl Default for FileSystemHandlePermissionDescriptor {
66 fn default() -> Self {
67 Self::new()
68 }
69}