]>
Commit | Line | Data |
---|---|---|
49aad941 | 1 | #![allow(unused_imports)] |
fe692bf9 | 2 | #![allow(clippy::all)] |
49aad941 FG |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; | |
5 | #[cfg(web_sys_unstable_apis)] | |
6 | #[wasm_bindgen] | |
7 | extern "C" { | |
8 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUQueueDescriptor)] | |
9 | #[derive(Debug, Clone, PartialEq, Eq)] | |
10 | #[doc = "The `GpuQueueDescriptor` dictionary."] | |
11 | #[doc = ""] | |
12 | #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] | |
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 GpuQueueDescriptor; | |
17 | } | |
18 | #[cfg(web_sys_unstable_apis)] | |
19 | impl GpuQueueDescriptor { | |
20 | #[doc = "Construct a new `GpuQueueDescriptor`."] | |
21 | #[doc = ""] | |
22 | #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] | |
23 | #[doc = ""] | |
24 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | |
25 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | |
26 | pub fn new() -> Self { | |
27 | #[allow(unused_mut)] | |
28 | let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); | |
29 | ret | |
30 | } | |
31 | #[cfg(web_sys_unstable_apis)] | |
32 | #[doc = "Change the `label` field of this object."] | |
33 | #[doc = ""] | |
34 | #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] | |
35 | #[doc = ""] | |
36 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | |
37 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | |
38 | pub fn label(&mut self, val: &str) -> &mut Self { | |
39 | use wasm_bindgen::JsValue; | |
40 | let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("label"), &JsValue::from(val)); | |
41 | debug_assert!( | |
42 | r.is_ok(), | |
43 | "setting properties should never fail on our dictionary objects" | |
44 | ); | |
45 | let _ = r; | |
46 | self | |
47 | } | |
48 | } | |
49 | #[cfg(web_sys_unstable_apis)] | |
50 | impl Default for GpuQueueDescriptor { | |
51 | fn default() -> Self { | |
52 | Self::new() | |
53 | } | |
54 | } |