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 = GPURenderBundleEncoderDescriptor)]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `GpuRenderBundleEncoderDescriptor` dictionary."]
10     #[doc = ""]
11     #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
12     #[doc = ""]
13     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15     pub type GpuRenderBundleEncoderDescriptor;
16 }
17 #[cfg(web_sys_unstable_apis)]
18 impl GpuRenderBundleEncoderDescriptor {
19     #[doc = "Construct a new `GpuRenderBundleEncoderDescriptor`."]
20     #[doc = ""]
21     #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
22     #[doc = ""]
23     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
new(color_formats: &::wasm_bindgen::JsValue) -> Self25     pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self {
26         #[allow(unused_mut)]
27         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
28         ret.color_formats(color_formats);
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: `GpuRenderBundleEncoderDescriptor`*"]
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)*"]
label(&mut self, val: &str) -> &mut Self38     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     #[cfg(web_sys_unstable_apis)]
49     #[doc = "Change the `colorFormats` field of this object."]
50     #[doc = ""]
51     #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
52     #[doc = ""]
53     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self55     pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
56         use wasm_bindgen::JsValue;
57         let r = ::js_sys::Reflect::set(
58             self.as_ref(),
59             &JsValue::from("colorFormats"),
60             &JsValue::from(val),
61         );
62         debug_assert!(
63             r.is_ok(),
64             "setting properties should never fail on our dictionary objects"
65         );
66         let _ = r;
67         self
68     }
69     #[cfg(web_sys_unstable_apis)]
70     #[cfg(feature = "GpuTextureFormat")]
71     #[doc = "Change the `depthStencilFormat` field of this object."]
72     #[doc = ""]
73     #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"]
74     #[doc = ""]
75     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
76     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self77     pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self {
78         use wasm_bindgen::JsValue;
79         let r = ::js_sys::Reflect::set(
80             self.as_ref(),
81             &JsValue::from("depthStencilFormat"),
82             &JsValue::from(val),
83         );
84         debug_assert!(
85             r.is_ok(),
86             "setting properties should never fail on our dictionary objects"
87         );
88         let _ = r;
89         self
90     }
91     #[cfg(web_sys_unstable_apis)]
92     #[doc = "Change the `sampleCount` field of this object."]
93     #[doc = ""]
94     #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
95     #[doc = ""]
96     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
sample_count(&mut self, val: u32) -> &mut Self98     pub fn sample_count(&mut self, val: u32) -> &mut Self {
99         use wasm_bindgen::JsValue;
100         let r = ::js_sys::Reflect::set(
101             self.as_ref(),
102             &JsValue::from("sampleCount"),
103             &JsValue::from(val),
104         );
105         debug_assert!(
106             r.is_ok(),
107             "setting properties should never fail on our dictionary objects"
108         );
109         let _ = r;
110         self
111     }
112     #[cfg(web_sys_unstable_apis)]
113     #[doc = "Change the `depthReadOnly` field of this object."]
114     #[doc = ""]
115     #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
116     #[doc = ""]
117     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
118     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
depth_read_only(&mut self, val: bool) -> &mut Self119     pub fn depth_read_only(&mut self, val: bool) -> &mut Self {
120         use wasm_bindgen::JsValue;
121         let r = ::js_sys::Reflect::set(
122             self.as_ref(),
123             &JsValue::from("depthReadOnly"),
124             &JsValue::from(val),
125         );
126         debug_assert!(
127             r.is_ok(),
128             "setting properties should never fail on our dictionary objects"
129         );
130         let _ = r;
131         self
132     }
133     #[cfg(web_sys_unstable_apis)]
134     #[doc = "Change the `stencilReadOnly` field of this object."]
135     #[doc = ""]
136     #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
137     #[doc = ""]
138     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
139     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
stencil_read_only(&mut self, val: bool) -> &mut Self140     pub fn stencil_read_only(&mut self, val: bool) -> &mut Self {
141         use wasm_bindgen::JsValue;
142         let r = ::js_sys::Reflect::set(
143             self.as_ref(),
144             &JsValue::from("stencilReadOnly"),
145             &JsValue::from(val),
146         );
147         debug_assert!(
148             r.is_ok(),
149             "setting properties should never fail on our dictionary objects"
150         );
151         let _ = r;
152         self
153     }
154 }
155