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 = TextEncoder , typescript_type = "TextEncoder")]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `TextEncoder` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `TextEncoder`*"]
13     pub type TextEncoder;
14     # [wasm_bindgen (structural , method , getter , js_class = "TextEncoder" , 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/TextEncoder/encoding)"]
18     #[doc = ""]
19     #[doc = "*This API requires the following crate features to be activated: `TextEncoder`*"]
encoding(this: &TextEncoder) -> String20     pub fn encoding(this: &TextEncoder) -> String;
21     #[wasm_bindgen(catch, constructor, js_class = "TextEncoder")]
22     #[doc = "The `new TextEncoder(..)` constructor, creating a new instance of `TextEncoder`."]
23     #[doc = ""]
24     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/TextEncoder)"]
25     #[doc = ""]
26     #[doc = "*This API requires the following crate features to be activated: `TextEncoder`*"]
new() -> Result<TextEncoder, JsValue>27     pub fn new() -> Result<TextEncoder, JsValue>;
28     # [wasm_bindgen (method , structural , js_class = "TextEncoder" , js_name = encode)]
29     #[doc = "The `encode()` method."]
30     #[doc = ""]
31     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encode)"]
32     #[doc = ""]
33     #[doc = "*This API requires the following crate features to be activated: `TextEncoder`*"]
encode(this: &TextEncoder) -> Vec<u8>34     pub fn encode(this: &TextEncoder) -> Vec<u8>;
35     # [wasm_bindgen (method , structural , js_class = "TextEncoder" , js_name = encode)]
36     #[doc = "The `encode()` method."]
37     #[doc = ""]
38     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder/encode)"]
39     #[doc = ""]
40     #[doc = "*This API requires the following crate features to be activated: `TextEncoder`*"]
encode_with_input(this: &TextEncoder, input: &str) -> Vec<u8>41     pub fn encode_with_input(this: &TextEncoder, input: &str) -> Vec<u8>;
42 }
43