web_sys/features/
gen_Gpu.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 = GPU , typescript_type = "GPU")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `Gpu` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `Gpu`*"]
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 Gpu;
19    #[cfg(web_sys_unstable_apis)]
20    #[cfg(feature = "WgslLanguageFeatures")]
21    # [wasm_bindgen (structural , method , getter , js_class = "GPU" , js_name = wgslLanguageFeatures)]
22    #[doc = "Getter for the `wgslLanguageFeatures` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/wgslLanguageFeatures)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `Gpu`, `WgslLanguageFeatures`*"]
27    #[doc = ""]
28    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
30    pub fn wgsl_language_features(this: &Gpu) -> WgslLanguageFeatures;
31    #[cfg(web_sys_unstable_apis)]
32    #[cfg(feature = "GpuTextureFormat")]
33    # [wasm_bindgen (method , structural , js_class = "GPU" , js_name = getPreferredCanvasFormat)]
34    #[doc = "The `getPreferredCanvasFormat()` method."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/getPreferredCanvasFormat)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `Gpu`, `GpuTextureFormat`*"]
39    #[doc = ""]
40    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    pub fn get_preferred_canvas_format(this: &Gpu) -> GpuTextureFormat;
43    #[cfg(web_sys_unstable_apis)]
44    # [wasm_bindgen (method , structural , js_class = "GPU" , js_name = requestAdapter)]
45    #[doc = "The `requestAdapter()` method."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/requestAdapter)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `Gpu`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    pub fn request_adapter(this: &Gpu) -> ::js_sys::Promise;
54    #[cfg(web_sys_unstable_apis)]
55    #[cfg(feature = "GpuRequestAdapterOptions")]
56    # [wasm_bindgen (method , structural , js_class = "GPU" , js_name = requestAdapter)]
57    #[doc = "The `requestAdapter()` method."]
58    #[doc = ""]
59    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/requestAdapter)"]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `Gpu`, `GpuRequestAdapterOptions`*"]
62    #[doc = ""]
63    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
64    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
65    pub fn request_adapter_with_options(
66        this: &Gpu,
67        options: &GpuRequestAdapterOptions,
68    ) -> ::js_sys::Promise;
69}