1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[cfg(web_sys_unstable_apis)]
5 #[wasm_bindgen]
6 extern "C" {
7     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUAdapter , typescript_type = "GPUAdapter")]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `GpuAdapter` class."]
10     #[doc = ""]
11     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter)"]
12     #[doc = ""]
13     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`*"]
14     #[doc = ""]
15     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
16     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
17     pub type GpuAdapter;
18     #[cfg(web_sys_unstable_apis)]
19     # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapter" , js_name = name)]
20     #[doc = "Getter for the `name` field of this object."]
21     #[doc = ""]
22     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/name)"]
23     #[doc = ""]
24     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`*"]
25     #[doc = ""]
26     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
name(this: &GpuAdapter) -> String28     pub fn name(this: &GpuAdapter) -> String;
29     #[cfg(web_sys_unstable_apis)]
30     #[cfg(feature = "GpuSupportedFeatures")]
31     # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapter" , js_name = features)]
32     #[doc = "Getter for the `features` field of this object."]
33     #[doc = ""]
34     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/features)"]
35     #[doc = ""]
36     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuSupportedFeatures`*"]
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)*"]
features(this: &GpuAdapter) -> GpuSupportedFeatures40     pub fn features(this: &GpuAdapter) -> GpuSupportedFeatures;
41     #[cfg(web_sys_unstable_apis)]
42     #[cfg(feature = "GpuSupportedLimits")]
43     # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapter" , js_name = limits)]
44     #[doc = "Getter for the `limits` field of this object."]
45     #[doc = ""]
46     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/limits)"]
47     #[doc = ""]
48     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuSupportedLimits`*"]
49     #[doc = ""]
50     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
limits(this: &GpuAdapter) -> GpuSupportedLimits52     pub fn limits(this: &GpuAdapter) -> GpuSupportedLimits;
53     #[cfg(web_sys_unstable_apis)]
54     # [wasm_bindgen (structural , method , getter , js_class = "GPUAdapter" , js_name = isSoftware)]
55     #[doc = "Getter for the `isSoftware` field of this object."]
56     #[doc = ""]
57     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/isSoftware)"]
58     #[doc = ""]
59     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`*"]
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)*"]
is_software(this: &GpuAdapter) -> bool63     pub fn is_software(this: &GpuAdapter) -> bool;
64     #[cfg(web_sys_unstable_apis)]
65     # [wasm_bindgen (method , structural , js_class = "GPUAdapter" , js_name = requestDevice)]
66     #[doc = "The `requestDevice()` method."]
67     #[doc = ""]
68     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/requestDevice)"]
69     #[doc = ""]
70     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`*"]
71     #[doc = ""]
72     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
request_device(this: &GpuAdapter) -> ::js_sys::Promise74     pub fn request_device(this: &GpuAdapter) -> ::js_sys::Promise;
75     #[cfg(web_sys_unstable_apis)]
76     #[cfg(feature = "GpuDeviceDescriptor")]
77     # [wasm_bindgen (method , structural , js_class = "GPUAdapter" , js_name = requestDevice)]
78     #[doc = "The `requestDevice()` method."]
79     #[doc = ""]
80     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/requestDevice)"]
81     #[doc = ""]
82     #[doc = "*This API requires the following crate features to be activated: `GpuAdapter`, `GpuDeviceDescriptor`*"]
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)*"]
request_device_with_descriptor( this: &GpuAdapter, descriptor: &GpuDeviceDescriptor, ) -> ::js_sys::Promise86     pub fn request_device_with_descriptor(
87         this: &GpuAdapter,
88         descriptor: &GpuDeviceDescriptor,
89     ) -> ::js_sys::Promise;
90 }
91