maxcountryman_web_sys/features/
gen_IdbFileHandle.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = IDBFileHandle , typescript_type = "IDBFileHandle")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `IdbFileHandle` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
13    pub type IdbFileHandle;
14    #[cfg(feature = "IdbMutableFile")]
15    # [wasm_bindgen (structural , method , getter , js_class = "IDBFileHandle" , js_name = mutableFile)]
16    #[doc = "Getter for the `mutableFile` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/mutableFile)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbMutableFile`*"]
21    pub fn mutable_file(this: &IdbFileHandle) -> Option<IdbMutableFile>;
22    #[cfg(feature = "IdbMutableFile")]
23    # [wasm_bindgen (structural , method , getter , js_class = "IDBFileHandle" , js_name = fileHandle)]
24    #[doc = "Getter for the `fileHandle` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/fileHandle)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbMutableFile`*"]
29    pub fn file_handle(this: &IdbFileHandle) -> Option<IdbMutableFile>;
30    # [wasm_bindgen (structural , method , getter , js_class = "IDBFileHandle" , js_name = active)]
31    #[doc = "Getter for the `active` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/active)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
36    pub fn active(this: &IdbFileHandle) -> bool;
37    # [wasm_bindgen (structural , method , getter , js_class = "IDBFileHandle" , js_name = location)]
38    #[doc = "Getter for the `location` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/location)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
43    pub fn location(this: &IdbFileHandle) -> Option<f64>;
44    # [wasm_bindgen (structural , method , setter , js_class = "IDBFileHandle" , js_name = location)]
45    #[doc = "Setter for the `location` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/location)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
50    pub fn set_location(this: &IdbFileHandle, value: Option<f64>);
51    # [wasm_bindgen (structural , method , getter , js_class = "IDBFileHandle" , js_name = oncomplete)]
52    #[doc = "Getter for the `oncomplete` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/oncomplete)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
57    pub fn oncomplete(this: &IdbFileHandle) -> Option<::js_sys::Function>;
58    # [wasm_bindgen (structural , method , setter , js_class = "IDBFileHandle" , js_name = oncomplete)]
59    #[doc = "Setter for the `oncomplete` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/oncomplete)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
64    pub fn set_oncomplete(this: &IdbFileHandle, value: Option<&::js_sys::Function>);
65    # [wasm_bindgen (structural , method , getter , js_class = "IDBFileHandle" , js_name = onabort)]
66    #[doc = "Getter for the `onabort` field of this object."]
67    #[doc = ""]
68    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/onabort)"]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
71    pub fn onabort(this: &IdbFileHandle) -> Option<::js_sys::Function>;
72    # [wasm_bindgen (structural , method , setter , js_class = "IDBFileHandle" , js_name = onabort)]
73    #[doc = "Setter for the `onabort` field of this object."]
74    #[doc = ""]
75    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/onabort)"]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
78    pub fn set_onabort(this: &IdbFileHandle, value: Option<&::js_sys::Function>);
79    # [wasm_bindgen (structural , method , getter , js_class = "IDBFileHandle" , js_name = onerror)]
80    #[doc = "Getter for the `onerror` field of this object."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/onerror)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
85    pub fn onerror(this: &IdbFileHandle) -> Option<::js_sys::Function>;
86    # [wasm_bindgen (structural , method , setter , js_class = "IDBFileHandle" , js_name = onerror)]
87    #[doc = "Setter for the `onerror` field of this object."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/onerror)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
92    pub fn set_onerror(this: &IdbFileHandle, value: Option<&::js_sys::Function>);
93    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = abort)]
94    #[doc = "The `abort()` method."]
95    #[doc = ""]
96    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/abort)"]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`*"]
99    pub fn abort(this: &IdbFileHandle) -> Result<(), JsValue>;
100    #[cfg(feature = "IdbFileRequest")]
101    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = append)]
102    #[doc = "The `append()` method."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/append)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
107    pub fn append_with_str(
108        this: &IdbFileHandle,
109        value: &str,
110    ) -> Result<Option<IdbFileRequest>, JsValue>;
111    #[cfg(feature = "IdbFileRequest")]
112    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = append)]
113    #[doc = "The `append()` method."]
114    #[doc = ""]
115    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/append)"]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
118    pub fn append_with_array_buffer(
119        this: &IdbFileHandle,
120        value: &::js_sys::ArrayBuffer,
121    ) -> Result<Option<IdbFileRequest>, JsValue>;
122    #[cfg(feature = "IdbFileRequest")]
123    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = append)]
124    #[doc = "The `append()` method."]
125    #[doc = ""]
126    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/append)"]
127    #[doc = ""]
128    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
129    pub fn append_with_array_buffer_view(
130        this: &IdbFileHandle,
131        value: &::js_sys::Object,
132    ) -> Result<Option<IdbFileRequest>, JsValue>;
133    #[cfg(feature = "IdbFileRequest")]
134    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = append)]
135    #[doc = "The `append()` method."]
136    #[doc = ""]
137    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/append)"]
138    #[doc = ""]
139    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
140    pub fn append_with_u8_array(
141        this: &IdbFileHandle,
142        value: &mut [u8],
143    ) -> Result<Option<IdbFileRequest>, JsValue>;
144    #[cfg(all(feature = "Blob", feature = "IdbFileRequest",))]
145    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = append)]
146    #[doc = "The `append()` method."]
147    #[doc = ""]
148    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/append)"]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `Blob`, `IdbFileHandle`, `IdbFileRequest`*"]
151    pub fn append_with_blob(
152        this: &IdbFileHandle,
153        value: &Blob,
154    ) -> Result<Option<IdbFileRequest>, JsValue>;
155    #[cfg(feature = "IdbFileRequest")]
156    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = flush)]
157    #[doc = "The `flush()` method."]
158    #[doc = ""]
159    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/flush)"]
160    #[doc = ""]
161    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
162    pub fn flush(this: &IdbFileHandle) -> Result<Option<IdbFileRequest>, JsValue>;
163    #[cfg(feature = "IdbFileRequest")]
164    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = getMetadata)]
165    #[doc = "The `getMetadata()` method."]
166    #[doc = ""]
167    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/getMetadata)"]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
170    pub fn get_metadata(this: &IdbFileHandle) -> Result<Option<IdbFileRequest>, JsValue>;
171    #[cfg(all(feature = "IdbFileMetadataParameters", feature = "IdbFileRequest",))]
172    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = getMetadata)]
173    #[doc = "The `getMetadata()` method."]
174    #[doc = ""]
175    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/getMetadata)"]
176    #[doc = ""]
177    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileMetadataParameters`, `IdbFileRequest`*"]
178    pub fn get_metadata_with_parameters(
179        this: &IdbFileHandle,
180        parameters: &IdbFileMetadataParameters,
181    ) -> Result<Option<IdbFileRequest>, JsValue>;
182    #[cfg(feature = "IdbFileRequest")]
183    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = readAsArrayBuffer)]
184    #[doc = "The `readAsArrayBuffer()` method."]
185    #[doc = ""]
186    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/readAsArrayBuffer)"]
187    #[doc = ""]
188    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
189    pub fn read_as_array_buffer_with_u32(
190        this: &IdbFileHandle,
191        size: u32,
192    ) -> Result<Option<IdbFileRequest>, JsValue>;
193    #[cfg(feature = "IdbFileRequest")]
194    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = readAsArrayBuffer)]
195    #[doc = "The `readAsArrayBuffer()` method."]
196    #[doc = ""]
197    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/readAsArrayBuffer)"]
198    #[doc = ""]
199    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
200    pub fn read_as_array_buffer_with_f64(
201        this: &IdbFileHandle,
202        size: f64,
203    ) -> Result<Option<IdbFileRequest>, JsValue>;
204    #[cfg(feature = "IdbFileRequest")]
205    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = readAsText)]
206    #[doc = "The `readAsText()` method."]
207    #[doc = ""]
208    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/readAsText)"]
209    #[doc = ""]
210    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
211    pub fn read_as_text_with_u32(
212        this: &IdbFileHandle,
213        size: u32,
214    ) -> Result<Option<IdbFileRequest>, JsValue>;
215    #[cfg(feature = "IdbFileRequest")]
216    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = readAsText)]
217    #[doc = "The `readAsText()` method."]
218    #[doc = ""]
219    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/readAsText)"]
220    #[doc = ""]
221    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
222    pub fn read_as_text_with_f64(
223        this: &IdbFileHandle,
224        size: f64,
225    ) -> Result<Option<IdbFileRequest>, JsValue>;
226    #[cfg(feature = "IdbFileRequest")]
227    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = readAsText)]
228    #[doc = "The `readAsText()` method."]
229    #[doc = ""]
230    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/readAsText)"]
231    #[doc = ""]
232    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
233    pub fn read_as_text_with_u32_and_encoding(
234        this: &IdbFileHandle,
235        size: u32,
236        encoding: Option<&str>,
237    ) -> Result<Option<IdbFileRequest>, JsValue>;
238    #[cfg(feature = "IdbFileRequest")]
239    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = readAsText)]
240    #[doc = "The `readAsText()` method."]
241    #[doc = ""]
242    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/readAsText)"]
243    #[doc = ""]
244    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
245    pub fn read_as_text_with_f64_and_encoding(
246        this: &IdbFileHandle,
247        size: f64,
248        encoding: Option<&str>,
249    ) -> Result<Option<IdbFileRequest>, JsValue>;
250    #[cfg(feature = "IdbFileRequest")]
251    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = truncate)]
252    #[doc = "The `truncate()` method."]
253    #[doc = ""]
254    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/truncate)"]
255    #[doc = ""]
256    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
257    pub fn truncate(this: &IdbFileHandle) -> Result<Option<IdbFileRequest>, JsValue>;
258    #[cfg(feature = "IdbFileRequest")]
259    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = truncate)]
260    #[doc = "The `truncate()` method."]
261    #[doc = ""]
262    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/truncate)"]
263    #[doc = ""]
264    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
265    pub fn truncate_with_u32(
266        this: &IdbFileHandle,
267        size: u32,
268    ) -> Result<Option<IdbFileRequest>, JsValue>;
269    #[cfg(feature = "IdbFileRequest")]
270    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = truncate)]
271    #[doc = "The `truncate()` method."]
272    #[doc = ""]
273    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/truncate)"]
274    #[doc = ""]
275    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
276    pub fn truncate_with_f64(
277        this: &IdbFileHandle,
278        size: f64,
279    ) -> Result<Option<IdbFileRequest>, JsValue>;
280    #[cfg(feature = "IdbFileRequest")]
281    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = write)]
282    #[doc = "The `write()` method."]
283    #[doc = ""]
284    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/write)"]
285    #[doc = ""]
286    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
287    pub fn write_with_str(
288        this: &IdbFileHandle,
289        value: &str,
290    ) -> Result<Option<IdbFileRequest>, JsValue>;
291    #[cfg(feature = "IdbFileRequest")]
292    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = write)]
293    #[doc = "The `write()` method."]
294    #[doc = ""]
295    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/write)"]
296    #[doc = ""]
297    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
298    pub fn write_with_array_buffer(
299        this: &IdbFileHandle,
300        value: &::js_sys::ArrayBuffer,
301    ) -> Result<Option<IdbFileRequest>, JsValue>;
302    #[cfg(feature = "IdbFileRequest")]
303    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = write)]
304    #[doc = "The `write()` method."]
305    #[doc = ""]
306    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/write)"]
307    #[doc = ""]
308    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
309    pub fn write_with_array_buffer_view(
310        this: &IdbFileHandle,
311        value: &::js_sys::Object,
312    ) -> Result<Option<IdbFileRequest>, JsValue>;
313    #[cfg(feature = "IdbFileRequest")]
314    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = write)]
315    #[doc = "The `write()` method."]
316    #[doc = ""]
317    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/write)"]
318    #[doc = ""]
319    #[doc = "*This API requires the following crate features to be activated: `IdbFileHandle`, `IdbFileRequest`*"]
320    pub fn write_with_u8_array(
321        this: &IdbFileHandle,
322        value: &mut [u8],
323    ) -> Result<Option<IdbFileRequest>, JsValue>;
324    #[cfg(all(feature = "Blob", feature = "IdbFileRequest",))]
325    # [wasm_bindgen (catch , method , structural , js_class = "IDBFileHandle" , js_name = write)]
326    #[doc = "The `write()` method."]
327    #[doc = ""]
328    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBFileHandle/write)"]
329    #[doc = ""]
330    #[doc = "*This API requires the following crate features to be activated: `Blob`, `IdbFileHandle`, `IdbFileRequest`*"]
331    pub fn write_with_blob(
332        this: &IdbFileHandle,
333        value: &Blob,
334    ) -> Result<Option<IdbFileRequest>, JsValue>;
335}