Skip to main content

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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    pub fn get_preferred_canvas_format(this: &Gpu) -> GpuTextureFormat;
43    #[cfg(web_sys_unstable_apis)]
44    #[cfg(feature = "GpuAdapter")]
45    # [wasm_bindgen (method , structural , js_class = "GPU" , js_name = requestAdapter)]
46    #[doc = "The `requestAdapter()` method."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/requestAdapter)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `Gpu`, `GpuAdapter`*"]
51    #[doc = ""]
52    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54    pub fn request_adapter(this: &Gpu) -> ::js_sys::Promise<::js_sys::JsOption<GpuAdapter>>;
55    #[cfg(web_sys_unstable_apis)]
56    #[cfg(all(feature = "GpuAdapter", feature = "GpuRequestAdapterOptions",))]
57    # [wasm_bindgen (method , structural , js_class = "GPU" , js_name = requestAdapter)]
58    #[doc = "The `requestAdapter()` method."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPU/requestAdapter)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `Gpu`, `GpuAdapter`, `GpuRequestAdapterOptions`*"]
63    #[doc = ""]
64    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
65    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
66    pub fn request_adapter_with_options(
67        this: &Gpu,
68        options: &GpuRequestAdapterOptions,
69    ) -> ::js_sys::Promise<::js_sys::JsOption<GpuAdapter>>;
70}