web_sys/features/
gen_GpuDeviceDescriptor.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 (extends = :: js_sys :: Object , js_name = GPUDeviceDescriptor)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuDeviceDescriptor` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type GpuDeviceDescriptor;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `label` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "label")]
25 pub fn get_label(this: &GpuDeviceDescriptor) -> Option<::alloc::string::String>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `label` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "label")]
34 pub fn set_label(this: &GpuDeviceDescriptor, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "GpuQueueDescriptor")]
37 #[doc = "Get the `defaultQueue` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"]
40 #[doc = ""]
41 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
43 #[wasm_bindgen(method, getter = "defaultQueue")]
44 pub fn get_default_queue(this: &GpuDeviceDescriptor) -> Option<GpuQueueDescriptor>;
45 #[cfg(web_sys_unstable_apis)]
46 #[cfg(feature = "GpuQueueDescriptor")]
47 #[doc = "Change the `defaultQueue` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"]
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 #[wasm_bindgen(method, setter = "defaultQueue")]
54 pub fn set_default_queue(this: &GpuDeviceDescriptor, val: &GpuQueueDescriptor);
55 #[cfg(web_sys_unstable_apis)]
56 #[doc = "Get the `requiredFeatures` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, getter = "requiredFeatures")]
63 pub fn get_required_features(this: &GpuDeviceDescriptor) -> Option<::js_sys::Array>;
64 #[cfg(web_sys_unstable_apis)]
65 #[doc = "Change the `requiredFeatures` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "requiredFeatures")]
72 pub fn set_required_features(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `requiredLimits` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "requiredLimits")]
81 pub fn get_required_limits(this: &GpuDeviceDescriptor) -> Option<::js_sys::Object>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `requiredLimits` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "requiredLimits")]
90 pub fn set_required_limits(this: &GpuDeviceDescriptor, val: &::js_sys::Object);
91}
92#[cfg(web_sys_unstable_apis)]
93impl GpuDeviceDescriptor {
94 #[doc = "Construct a new `GpuDeviceDescriptor`."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"]
97 #[doc = ""]
98 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
100 pub fn new() -> Self {
101 #[allow(unused_mut)]
102 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
103 ret
104 }
105 #[cfg(web_sys_unstable_apis)]
106 #[deprecated = "Use `set_label()` instead."]
107 pub fn label(&mut self, val: &str) -> &mut Self {
108 self.set_label(val);
109 self
110 }
111 #[cfg(web_sys_unstable_apis)]
112 #[cfg(feature = "GpuQueueDescriptor")]
113 #[deprecated = "Use `set_default_queue()` instead."]
114 pub fn default_queue(&mut self, val: &GpuQueueDescriptor) -> &mut Self {
115 self.set_default_queue(val);
116 self
117 }
118 #[cfg(web_sys_unstable_apis)]
119 #[deprecated = "Use `set_required_features()` instead."]
120 pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
121 self.set_required_features(val);
122 self
123 }
124 #[cfg(web_sys_unstable_apis)]
125 #[deprecated = "Use `set_required_limits()` instead."]
126 pub fn required_limits(&mut self, val: &::js_sys::Object) -> &mut Self {
127 self.set_required_limits(val);
128 self
129 }
130}
131#[cfg(web_sys_unstable_apis)]
132impl Default for GpuDeviceDescriptor {
133 fn default() -> Self {
134 Self::new()
135 }
136}