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