web_sys/features/
gen_ImageDecoder.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ImageDecoder , typescript_type = "ImageDecoder")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `ImageDecoder` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
15    #[doc = ""]
16    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18    pub type ImageDecoder;
19    #[cfg(web_sys_unstable_apis)]
20    # [wasm_bindgen (structural , method , getter , js_class = "ImageDecoder" , js_name = type)]
21    #[doc = "Getter for the `type` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/type)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
26    #[doc = ""]
27    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
29    pub fn type_(this: &ImageDecoder) -> ::alloc::string::String;
30    #[cfg(web_sys_unstable_apis)]
31    # [wasm_bindgen (structural , method , getter , js_class = "ImageDecoder" , js_name = complete)]
32    #[doc = "Getter for the `complete` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/complete)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
37    #[doc = ""]
38    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
40    pub fn complete(this: &ImageDecoder) -> bool;
41    #[cfg(web_sys_unstable_apis)]
42    # [wasm_bindgen (structural , method , getter , js_class = "ImageDecoder" , js_name = completed)]
43    #[doc = "Getter for the `completed` field of this object."]
44    #[doc = ""]
45    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/completed)"]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
48    #[doc = ""]
49    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    pub fn completed(this: &ImageDecoder) -> ::js_sys::Promise;
52    #[cfg(web_sys_unstable_apis)]
53    #[cfg(feature = "ImageTrackList")]
54    # [wasm_bindgen (structural , method , getter , js_class = "ImageDecoder" , js_name = tracks)]
55    #[doc = "Getter for the `tracks` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/tracks)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`, `ImageTrackList`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    pub fn tracks(this: &ImageDecoder) -> ImageTrackList;
64    #[cfg(web_sys_unstable_apis)]
65    #[cfg(feature = "ImageDecoderInit")]
66    #[wasm_bindgen(catch, constructor, js_class = "ImageDecoder")]
67    #[doc = "The `new ImageDecoder(..)` constructor, creating a new instance of `ImageDecoder`."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/ImageDecoder)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`, `ImageDecoderInit`*"]
72    #[doc = ""]
73    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
75    pub fn new(init: &ImageDecoderInit) -> Result<ImageDecoder, JsValue>;
76    #[cfg(web_sys_unstable_apis)]
77    # [wasm_bindgen (method , structural , js_class = "ImageDecoder" , js_name = close)]
78    #[doc = "The `close()` method."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/close)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
83    #[doc = ""]
84    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
85    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
86    pub fn close(this: &ImageDecoder);
87    #[cfg(web_sys_unstable_apis)]
88    # [wasm_bindgen (method , structural , js_class = "ImageDecoder" , js_name = decode)]
89    #[doc = "The `decode()` method."]
90    #[doc = ""]
91    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/decode)"]
92    #[doc = ""]
93    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
94    #[doc = ""]
95    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
96    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
97    pub fn decode(this: &ImageDecoder) -> ::js_sys::Promise;
98    #[cfg(web_sys_unstable_apis)]
99    #[cfg(feature = "ImageDecodeOptions")]
100    # [wasm_bindgen (method , structural , js_class = "ImageDecoder" , js_name = decode)]
101    #[doc = "The `decode()` method."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/decode)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`, `ImageDecoder`*"]
106    #[doc = ""]
107    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
109    pub fn decode_with_options(
110        this: &ImageDecoder,
111        options: &ImageDecodeOptions,
112    ) -> ::js_sys::Promise;
113    #[cfg(web_sys_unstable_apis)]
114    # [wasm_bindgen (static_method_of = ImageDecoder , js_class = "ImageDecoder" , js_name = isTypeSupported)]
115    #[doc = "The `isTypeSupported()` method."]
116    #[doc = ""]
117    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/isTypeSupported_static)"]
118    #[doc = ""]
119    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
120    #[doc = ""]
121    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
122    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
123    pub fn is_type_supported(type_: &str) -> ::js_sys::Promise;
124    #[cfg(web_sys_unstable_apis)]
125    # [wasm_bindgen (method , structural , js_class = "ImageDecoder" , js_name = reset)]
126    #[doc = "The `reset()` method."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/reset)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
131    #[doc = ""]
132    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
133    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
134    pub fn reset(this: &ImageDecoder);
135}