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 = FileSystemSyncAccessHandle , typescript_type = "FileSystemSyncAccessHandle")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `FileSystemSyncAccessHandle` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
14 pub type FileSystemSyncAccessHandle;
15 # [wasm_bindgen (method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = close)]
16 #[doc = "The `close()` method."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/close)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
21 pub fn close(this: &FileSystemSyncAccessHandle);
22 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = flush)]
23 #[doc = "The `flush()` method."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/flush)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
28 pub fn flush(this: &FileSystemSyncAccessHandle) -> Result<(), JsValue>;
29 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = getSize)]
30 #[doc = "The `getSize()` method."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/getSize)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
35 pub fn get_size(this: &FileSystemSyncAccessHandle) -> Result<f64, JsValue>;
36 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)]
37 #[doc = "The `read()` method."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
42 pub fn read_with_buffer_source(
43 this: &FileSystemSyncAccessHandle,
44 buffer: &::js_sys::Object,
45 ) -> Result<f64, JsValue>;
46 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)]
47 #[doc = "The `read()` method."]
48 #[doc = ""]
49 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
52 pub fn read_with_u8_array(
53 this: &FileSystemSyncAccessHandle,
54 buffer: &mut [u8],
55 ) -> Result<f64, JsValue>;
56 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)]
57 #[doc = "The `read()` method."]
58 #[doc = ""]
59 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
62 pub fn read_with_js_u8_array(
63 this: &FileSystemSyncAccessHandle,
64 buffer: &::js_sys::Uint8Array,
65 ) -> Result<f64, JsValue>;
66 #[cfg(feature = "FileSystemReadWriteOptions")]
67 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)]
68 #[doc = "The `read()` method."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"]
73 pub fn read_with_buffer_source_and_options(
74 this: &FileSystemSyncAccessHandle,
75 buffer: &::js_sys::Object,
76 options: &FileSystemReadWriteOptions,
77 ) -> Result<f64, JsValue>;
78 #[cfg(feature = "FileSystemReadWriteOptions")]
79 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)]
80 #[doc = "The `read()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"]
85 pub fn read_with_u8_array_and_options(
86 this: &FileSystemSyncAccessHandle,
87 buffer: &mut [u8],
88 options: &FileSystemReadWriteOptions,
89 ) -> Result<f64, JsValue>;
90 #[cfg(feature = "FileSystemReadWriteOptions")]
91 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)]
92 #[doc = "The `read()` method."]
93 #[doc = ""]
94 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"]
97 pub fn read_with_js_u8_array_and_options(
98 this: &FileSystemSyncAccessHandle,
99 buffer: &::js_sys::Uint8Array,
100 options: &FileSystemReadWriteOptions,
101 ) -> Result<f64, JsValue>;
102 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = truncate)]
103 #[doc = "The `truncate()` method."]
104 #[doc = ""]
105 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/truncate)"]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
108 pub fn truncate_with_u32(
109 this: &FileSystemSyncAccessHandle,
110 new_size: u32,
111 ) -> Result<(), JsValue>;
112 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = truncate)]
113 #[doc = "The `truncate()` method."]
114 #[doc = ""]
115 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/truncate)"]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
118 pub fn truncate_with_f64(
119 this: &FileSystemSyncAccessHandle,
120 new_size: f64,
121 ) -> Result<(), JsValue>;
122 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)]
123 #[doc = "The `write()` method."]
124 #[doc = ""]
125 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
128 pub fn write_with_buffer_source(
129 this: &FileSystemSyncAccessHandle,
130 buffer: &::js_sys::Object,
131 ) -> Result<f64, JsValue>;
132 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)]
133 #[doc = "The `write()` method."]
134 #[doc = ""]
135 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"]
136 #[doc = ""]
137 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
138 pub fn write_with_u8_array(
139 this: &FileSystemSyncAccessHandle,
140 buffer: &[u8],
141 ) -> Result<f64, JsValue>;
142 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)]
143 #[doc = "The `write()` method."]
144 #[doc = ""]
145 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"]
146 #[doc = ""]
147 #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"]
148 pub fn write_with_js_u8_array(
149 this: &FileSystemSyncAccessHandle,
150 buffer: &::js_sys::Uint8Array,
151 ) -> Result<f64, JsValue>;
152 #[cfg(feature = "FileSystemReadWriteOptions")]
153 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)]
154 #[doc = "The `write()` method."]
155 #[doc = ""]
156 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"]
159 pub fn write_with_buffer_source_and_options(
160 this: &FileSystemSyncAccessHandle,
161 buffer: &::js_sys::Object,
162 options: &FileSystemReadWriteOptions,
163 ) -> Result<f64, JsValue>;
164 #[cfg(feature = "FileSystemReadWriteOptions")]
165 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)]
166 #[doc = "The `write()` method."]
167 #[doc = ""]
168 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"]
169 #[doc = ""]
170 #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"]
171 pub fn write_with_u8_array_and_options(
172 this: &FileSystemSyncAccessHandle,
173 buffer: &[u8],
174 options: &FileSystemReadWriteOptions,
175 ) -> Result<f64, JsValue>;
176 #[cfg(feature = "FileSystemReadWriteOptions")]
177 # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)]
178 #[doc = "The `write()` method."]
179 #[doc = ""]
180 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"]
181 #[doc = ""]
182 #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"]
183 pub fn write_with_js_u8_array_and_options(
184 this: &FileSystemSyncAccessHandle,
185 buffer: &::js_sys::Uint8Array,
186 options: &FileSystemReadWriteOptions,
187 ) -> Result<f64, JsValue>;
188}