web_sys/features/
gen_NativeOsFileWriteAtomicOptions.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "NativeOSFileWriteAtomicOptions"
10 )]
11 #[derive(Debug, Clone, PartialEq, Eq)]
12 #[doc = "The `NativeOsFileWriteAtomicOptions` dictionary."]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
15 pub type NativeOsFileWriteAtomicOptions;
16 #[doc = "Get the `backupTo` field of this object."]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
19 #[wasm_bindgen(method, getter = "backupTo")]
20 pub fn get_backup_to(this: &NativeOsFileWriteAtomicOptions) -> Option<::alloc::string::String>;
21 #[doc = "Change the `backupTo` field of this object."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
24 #[wasm_bindgen(method, setter = "backupTo")]
25 pub fn set_backup_to(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>);
26 #[doc = "Get the `bytes` field of this object."]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
29 #[wasm_bindgen(method, getter = "bytes")]
30 pub fn get_bytes(this: &NativeOsFileWriteAtomicOptions) -> Option<f64>;
31 #[doc = "Change the `bytes` field of this object."]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
34 #[wasm_bindgen(method, setter = "bytes")]
35 pub fn set_bytes(this: &NativeOsFileWriteAtomicOptions, val: Option<f64>);
36 #[doc = "Change the `bytes` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
39 #[wasm_bindgen(method, setter = "bytes")]
40 pub fn set_bytes_opt_u32(this: &NativeOsFileWriteAtomicOptions, val: Option<u32>);
41 #[doc = "Change the `bytes` field of this object."]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
44 #[wasm_bindgen(method, setter = "bytes")]
45 pub fn set_bytes_opt_f64(this: &NativeOsFileWriteAtomicOptions, val: Option<f64>);
46 #[doc = "Get the `flush` field of this object."]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
49 #[wasm_bindgen(method, getter = "flush")]
50 pub fn get_flush(this: &NativeOsFileWriteAtomicOptions) -> Option<bool>;
51 #[doc = "Change the `flush` field of this object."]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
54 #[wasm_bindgen(method, setter = "flush")]
55 pub fn set_flush(this: &NativeOsFileWriteAtomicOptions, val: bool);
56 #[doc = "Get the `noOverwrite` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
59 #[wasm_bindgen(method, getter = "noOverwrite")]
60 pub fn get_no_overwrite(this: &NativeOsFileWriteAtomicOptions) -> Option<bool>;
61 #[doc = "Change the `noOverwrite` field of this object."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
64 #[wasm_bindgen(method, setter = "noOverwrite")]
65 pub fn set_no_overwrite(this: &NativeOsFileWriteAtomicOptions, val: bool);
66 #[doc = "Get the `tmpPath` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
69 #[wasm_bindgen(method, getter = "tmpPath")]
70 pub fn get_tmp_path(this: &NativeOsFileWriteAtomicOptions) -> Option<::alloc::string::String>;
71 #[doc = "Change the `tmpPath` field of this object."]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
74 #[wasm_bindgen(method, setter = "tmpPath")]
75 pub fn set_tmp_path(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>);
76}
77impl NativeOsFileWriteAtomicOptions {
78 #[doc = "Construct a new `NativeOsFileWriteAtomicOptions`."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"]
81 pub fn new() -> Self {
82 #[allow(unused_mut)]
83 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
84 ret
85 }
86 #[deprecated = "Use `set_backup_to()` instead."]
87 pub fn backup_to(&mut self, val: Option<&str>) -> &mut Self {
88 self.set_backup_to(val);
89 self
90 }
91 #[deprecated = "Use `set_bytes()` instead."]
92 pub fn bytes(&mut self, val: Option<f64>) -> &mut Self {
93 self.set_bytes(val);
94 self
95 }
96 #[deprecated = "Use `set_flush()` instead."]
97 pub fn flush(&mut self, val: bool) -> &mut Self {
98 self.set_flush(val);
99 self
100 }
101 #[deprecated = "Use `set_no_overwrite()` instead."]
102 pub fn no_overwrite(&mut self, val: bool) -> &mut Self {
103 self.set_no_overwrite(val);
104 self
105 }
106 #[deprecated = "Use `set_tmp_path()` instead."]
107 pub fn tmp_path(&mut self, val: Option<&str>) -> &mut Self {
108 self.set_tmp_path(val);
109 self
110 }
111}
112impl Default for NativeOsFileWriteAtomicOptions {
113 fn default() -> Self {
114 Self::new()
115 }
116}