]>
Commit | Line | Data |
---|---|---|
49aad941 | 1 | #![allow(unused_imports)] |
fe692bf9 | 2 | #![allow(clippy::all)] |
49aad941 FG |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; | |
5 | #[wasm_bindgen] | |
6 | extern "C" { | |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemFlags)] | |
8 | #[derive(Debug, Clone, PartialEq, Eq)] | |
9 | #[doc = "The `FileSystemFlags` dictionary."] | |
10 | #[doc = ""] | |
11 | #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] | |
12 | pub type FileSystemFlags; | |
13 | } | |
14 | impl FileSystemFlags { | |
15 | #[doc = "Construct a new `FileSystemFlags`."] | |
16 | #[doc = ""] | |
17 | #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] | |
18 | pub fn new() -> Self { | |
19 | #[allow(unused_mut)] | |
20 | let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); | |
21 | ret | |
22 | } | |
23 | #[doc = "Change the `create` field of this object."] | |
24 | #[doc = ""] | |
25 | #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] | |
26 | pub fn create(&mut self, val: bool) -> &mut Self { | |
27 | use wasm_bindgen::JsValue; | |
28 | let r = | |
29 | ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("create"), &JsValue::from(val)); | |
30 | debug_assert!( | |
31 | r.is_ok(), | |
32 | "setting properties should never fail on our dictionary objects" | |
33 | ); | |
34 | let _ = r; | |
35 | self | |
36 | } | |
37 | #[doc = "Change the `exclusive` field of this object."] | |
38 | #[doc = ""] | |
39 | #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] | |
40 | pub fn exclusive(&mut self, val: bool) -> &mut Self { | |
41 | use wasm_bindgen::JsValue; | |
42 | let r = ::js_sys::Reflect::set( | |
43 | self.as_ref(), | |
44 | &JsValue::from("exclusive"), | |
45 | &JsValue::from(val), | |
46 | ); | |
47 | debug_assert!( | |
48 | r.is_ok(), | |
49 | "setting properties should never fail on our dictionary objects" | |
50 | ); | |
51 | let _ = r; | |
52 | self | |
53 | } | |
54 | } | |
55 | impl Default for FileSystemFlags { | |
56 | fn default() -> Self { | |
57 | Self::new() | |
58 | } | |
59 | } |