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 = TextDecoder , typescript_type = "TextDecoder" ) ]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `TextDecoder` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
13     pub type TextDecoder;
14     # [ wasm_bindgen ( structural , method , getter , js_class = "TextDecoder" , js_name = encoding ) ]
15     #[doc = "Getter for the `encoding` field of this object."]
16     #[doc = ""]
17     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/encoding)"]
18     #[doc = ""]
19     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
encoding(this: &TextDecoder) -> String20     pub fn encoding(this: &TextDecoder) -> String;
21     # [ wasm_bindgen ( structural , method , getter , js_class = "TextDecoder" , js_name = fatal ) ]
22     #[doc = "Getter for the `fatal` field of this object."]
23     #[doc = ""]
24     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/fatal)"]
25     #[doc = ""]
26     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
fatal(this: &TextDecoder) -> bool27     pub fn fatal(this: &TextDecoder) -> bool;
28     #[wasm_bindgen(catch, constructor, js_class = "TextDecoder")]
29     #[doc = "The `new TextDecoder(..)` constructor, creating a new instance of `TextDecoder`."]
30     #[doc = ""]
31     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoder)"]
32     #[doc = ""]
33     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
new() -> Result<TextDecoder, JsValue>34     pub fn new() -> Result<TextDecoder, JsValue>;
35     #[wasm_bindgen(catch, constructor, js_class = "TextDecoder")]
36     #[doc = "The `new TextDecoder(..)` constructor, creating a new instance of `TextDecoder`."]
37     #[doc = ""]
38     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoder)"]
39     #[doc = ""]
40     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
new_with_label(label: &str) -> Result<TextDecoder, JsValue>41     pub fn new_with_label(label: &str) -> Result<TextDecoder, JsValue>;
42     #[cfg(feature = "TextDecoderOptions")]
43     #[wasm_bindgen(catch, constructor, js_class = "TextDecoder")]
44     #[doc = "The `new TextDecoder(..)` constructor, creating a new instance of `TextDecoder`."]
45     #[doc = ""]
46     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/TextDecoder)"]
47     #[doc = ""]
48     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`, `TextDecoderOptions`*"]
new_with_label_and_options( label: &str, options: &TextDecoderOptions, ) -> Result<TextDecoder, JsValue>49     pub fn new_with_label_and_options(
50         label: &str,
51         options: &TextDecoderOptions,
52     ) -> Result<TextDecoder, JsValue>;
53     # [ wasm_bindgen ( catch , method , structural , js_class = "TextDecoder" , js_name = decode ) ]
54     #[doc = "The `decode()` method."]
55     #[doc = ""]
56     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/decode)"]
57     #[doc = ""]
58     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
decode(this: &TextDecoder) -> Result<String, JsValue>59     pub fn decode(this: &TextDecoder) -> Result<String, JsValue>;
60     # [ wasm_bindgen ( catch , method , structural , js_class = "TextDecoder" , js_name = decode ) ]
61     #[doc = "The `decode()` method."]
62     #[doc = ""]
63     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/decode)"]
64     #[doc = ""]
65     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
decode_with_buffer_source( this: &TextDecoder, input: &::js_sys::Object, ) -> Result<String, JsValue>66     pub fn decode_with_buffer_source(
67         this: &TextDecoder,
68         input: &::js_sys::Object,
69     ) -> Result<String, JsValue>;
70     # [ wasm_bindgen ( catch , method , structural , js_class = "TextDecoder" , js_name = decode ) ]
71     #[doc = "The `decode()` method."]
72     #[doc = ""]
73     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/decode)"]
74     #[doc = ""]
75     #[doc = "*This API requires the following crate features to be activated: `TextDecoder`*"]
decode_with_u8_array(this: &TextDecoder, input: &mut [u8]) -> Result<String, JsValue>76     pub fn decode_with_u8_array(this: &TextDecoder, input: &mut [u8]) -> Result<String, JsValue>;
77     #[cfg(feature = "TextDecodeOptions")]
78     # [ wasm_bindgen ( catch , method , structural , js_class = "TextDecoder" , js_name = decode ) ]
79     #[doc = "The `decode()` method."]
80     #[doc = ""]
81     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/decode)"]
82     #[doc = ""]
83     #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`, `TextDecoder`*"]
decode_with_buffer_source_and_options( this: &TextDecoder, input: &::js_sys::Object, options: &TextDecodeOptions, ) -> Result<String, JsValue>84     pub fn decode_with_buffer_source_and_options(
85         this: &TextDecoder,
86         input: &::js_sys::Object,
87         options: &TextDecodeOptions,
88     ) -> Result<String, JsValue>;
89     #[cfg(feature = "TextDecodeOptions")]
90     # [ wasm_bindgen ( catch , method , structural , js_class = "TextDecoder" , js_name = decode ) ]
91     #[doc = "The `decode()` method."]
92     #[doc = ""]
93     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder/decode)"]
94     #[doc = ""]
95     #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`, `TextDecoder`*"]
decode_with_u8_array_and_options( this: &TextDecoder, input: &mut [u8], options: &TextDecodeOptions, ) -> Result<String, JsValue>96     pub fn decode_with_u8_array_and_options(
97         this: &TextDecoder,
98         input: &mut [u8],
99         options: &TextDecodeOptions,
100     ) -> Result<String, JsValue>;
101 }
102