Skip to main content

web_sys/features/
gen_NativeOsFileWriteAtomicOptions.rs

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