Skip to main content

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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    pub fn completed(this: &ImageDecoder) -> ::js_sys::Promise<::js_sys::Undefined>;
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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
86    pub fn close(this: &ImageDecoder);
87    #[cfg(web_sys_unstable_apis)]
88    #[cfg(feature = "ImageDecodeResult")]
89    # [wasm_bindgen (method , structural , js_class = "ImageDecoder" , js_name = decode)]
90    #[doc = "The `decode()` method."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/decode)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`, `ImageDecoder`*"]
95    #[doc = ""]
96    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
98    pub fn decode(this: &ImageDecoder) -> ::js_sys::Promise<ImageDecodeResult>;
99    #[cfg(web_sys_unstable_apis)]
100    #[cfg(all(feature = "ImageDecodeOptions", feature = "ImageDecodeResult",))]
101    # [wasm_bindgen (method , structural , js_class = "ImageDecoder" , js_name = decode)]
102    #[doc = "The `decode()` method."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/decode)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`, `ImageDecodeResult`, `ImageDecoder`*"]
107    #[doc = ""]
108    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
109    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
110    pub fn decode_with_options(
111        this: &ImageDecoder,
112        options: &ImageDecodeOptions,
113    ) -> ::js_sys::Promise<ImageDecodeResult>;
114    #[cfg(web_sys_unstable_apis)]
115    # [wasm_bindgen (static_method_of = ImageDecoder , js_class = "ImageDecoder" , js_name = isTypeSupported)]
116    #[doc = "The `isTypeSupported()` method."]
117    #[doc = ""]
118    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/isTypeSupported_static)"]
119    #[doc = ""]
120    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
121    #[doc = ""]
122    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
123    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
124    pub fn is_type_supported(type_: &str) -> ::js_sys::Promise<::js_sys::Boolean>;
125    #[cfg(web_sys_unstable_apis)]
126    # [wasm_bindgen (method , structural , js_class = "ImageDecoder" , js_name = reset)]
127    #[doc = "The `reset()` method."]
128    #[doc = ""]
129    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder/reset)"]
130    #[doc = ""]
131    #[doc = "*This API requires the following crate features to be activated: `ImageDecoder`*"]
132    #[doc = ""]
133    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
134    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
135    pub fn reset(this: &ImageDecoder);
136}