Skip to main content

web_sys/features/
gen_FileSystemSyncAccessHandleOptions.rs

1#![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 = "FileSystemSyncAccessHandleOptions"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `FileSystemSyncAccessHandleOptions` dictionary."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandleOptions`*"]
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 FileSystemSyncAccessHandleOptions;
20    #[cfg(web_sys_unstable_apis)]
21    #[cfg(feature = "FileSystemSyncAccessHandleMode")]
22    #[doc = "Get the `mode` field of this object."]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandleMode`, `FileSystemSyncAccessHandleOptions`*"]
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: &FileSystemSyncAccessHandleOptions,
31    ) -> Option<FileSystemSyncAccessHandleMode>;
32    #[cfg(web_sys_unstable_apis)]
33    #[cfg(feature = "FileSystemSyncAccessHandleMode")]
34    #[doc = "Change the `mode` field of this object."]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandleMode`, `FileSystemSyncAccessHandleOptions`*"]
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: &FileSystemSyncAccessHandleOptions, val: FileSystemSyncAccessHandleMode);
42}
43#[cfg(web_sys_unstable_apis)]
44impl FileSystemSyncAccessHandleOptions {
45    #[doc = "Construct a new `FileSystemSyncAccessHandleOptions`."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandleOptions`*"]
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 = "FileSystemSyncAccessHandleMode")]
58    #[deprecated = "Use `set_mode()` instead."]
59    pub fn mode(&mut self, val: FileSystemSyncAccessHandleMode) -> &mut Self {
60        self.set_mode(val);
61        self
62    }
63}
64#[cfg(web_sys_unstable_apis)]
65impl Default for FileSystemSyncAccessHandleOptions {
66    fn default() -> Self {
67        Self::new()
68    }
69}