1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileReaderSync , typescript_type = "FileReaderSync")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `FileReaderSync` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `FileReaderSync`*"] 13 pub type FileReaderSync; 14 #[wasm_bindgen(catch, constructor, js_class = "FileReaderSync")] 15 #[doc = "The `new FileReaderSync(..)` constructor, creating a new instance of `FileReaderSync`."] 16 #[doc = ""] 17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync/FileReaderSync)"] 18 #[doc = ""] 19 #[doc = "*This API requires the following crate features to be activated: `FileReaderSync`*"] new() -> Result<FileReaderSync, JsValue>20 pub fn new() -> Result<FileReaderSync, JsValue>; 21 #[cfg(feature = "Blob")] 22 # [wasm_bindgen (catch , method , structural , js_class = "FileReaderSync" , js_name = readAsArrayBuffer)] 23 #[doc = "The `readAsArrayBuffer()` method."] 24 #[doc = ""] 25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync/readAsArrayBuffer)"] 26 #[doc = ""] 27 #[doc = "*This API requires the following crate features to be activated: `Blob`, `FileReaderSync`*"] read_as_array_buffer( this: &FileReaderSync, blob: &Blob, ) -> Result<::js_sys::ArrayBuffer, JsValue>28 pub fn read_as_array_buffer( 29 this: &FileReaderSync, 30 blob: &Blob, 31 ) -> Result<::js_sys::ArrayBuffer, JsValue>; 32 #[cfg(feature = "Blob")] 33 # [wasm_bindgen (catch , method , structural , js_class = "FileReaderSync" , js_name = readAsBinaryString)] 34 #[doc = "The `readAsBinaryString()` method."] 35 #[doc = ""] 36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync/readAsBinaryString)"] 37 #[doc = ""] 38 #[doc = "*This API requires the following crate features to be activated: `Blob`, `FileReaderSync`*"] read_as_binary_string(this: &FileReaderSync, blob: &Blob) -> Result<String, JsValue>39 pub fn read_as_binary_string(this: &FileReaderSync, blob: &Blob) -> Result<String, JsValue>; 40 #[cfg(feature = "Blob")] 41 # [wasm_bindgen (catch , method , structural , js_class = "FileReaderSync" , js_name = readAsDataURL)] 42 #[doc = "The `readAsDataURL()` method."] 43 #[doc = ""] 44 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync/readAsDataURL)"] 45 #[doc = ""] 46 #[doc = "*This API requires the following crate features to be activated: `Blob`, `FileReaderSync`*"] read_as_data_url(this: &FileReaderSync, blob: &Blob) -> Result<String, JsValue>47 pub fn read_as_data_url(this: &FileReaderSync, blob: &Blob) -> Result<String, JsValue>; 48 #[cfg(feature = "Blob")] 49 # [wasm_bindgen (catch , method , structural , js_class = "FileReaderSync" , js_name = readAsText)] 50 #[doc = "The `readAsText()` method."] 51 #[doc = ""] 52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync/readAsText)"] 53 #[doc = ""] 54 #[doc = "*This API requires the following crate features to be activated: `Blob`, `FileReaderSync`*"] read_as_text(this: &FileReaderSync, blob: &Blob) -> Result<String, JsValue>55 pub fn read_as_text(this: &FileReaderSync, blob: &Blob) -> Result<String, JsValue>; 56 #[cfg(feature = "Blob")] 57 # [wasm_bindgen (catch , method , structural , js_class = "FileReaderSync" , js_name = readAsText)] 58 #[doc = "The `readAsText()` method."] 59 #[doc = ""] 60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReaderSync/readAsText)"] 61 #[doc = ""] 62 #[doc = "*This API requires the following crate features to be activated: `Blob`, `FileReaderSync`*"] read_as_text_with_encoding( this: &FileReaderSync, blob: &Blob, encoding: &str, ) -> Result<String, JsValue>63 pub fn read_as_text_with_encoding( 64 this: &FileReaderSync, 65 blob: &Blob, 66 encoding: &str, 67 ) -> Result<String, JsValue>; 68 } 69