web_sys/features/
gen_GpuRenderBundleEncoderDescriptor.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 = GPURenderBundleEncoderDescriptor)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuRenderBundleEncoderDescriptor` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
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 GpuRenderBundleEncoderDescriptor;
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: `GpuRenderBundleEncoderDescriptor`*"]
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: &GpuRenderBundleEncoderDescriptor) -> 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: `GpuRenderBundleEncoderDescriptor`*"]
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: &GpuRenderBundleEncoderDescriptor, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `colorFormats` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "colorFormats")]
43 pub fn get_color_formats(this: &GpuRenderBundleEncoderDescriptor) -> ::js_sys::Array;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `colorFormats` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "colorFormats")]
52 pub fn set_color_formats(
53 this: &GpuRenderBundleEncoderDescriptor,
54 val: &::wasm_bindgen::JsValue,
55 );
56 #[cfg(web_sys_unstable_apis)]
57 #[cfg(feature = "GpuTextureFormat")]
58 #[doc = "Get the `depthStencilFormat` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"]
61 #[doc = ""]
62 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
64 #[wasm_bindgen(method, getter = "depthStencilFormat")]
65 pub fn get_depth_stencil_format(
66 this: &GpuRenderBundleEncoderDescriptor,
67 ) -> Option<GpuTextureFormat>;
68 #[cfg(web_sys_unstable_apis)]
69 #[cfg(feature = "GpuTextureFormat")]
70 #[doc = "Change the `depthStencilFormat` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"]
73 #[doc = ""]
74 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
76 #[wasm_bindgen(method, setter = "depthStencilFormat")]
77 pub fn set_depth_stencil_format(this: &GpuRenderBundleEncoderDescriptor, val: GpuTextureFormat);
78 #[cfg(web_sys_unstable_apis)]
79 #[doc = "Get the `sampleCount` field of this object."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 #[wasm_bindgen(method, getter = "sampleCount")]
86 pub fn get_sample_count(this: &GpuRenderBundleEncoderDescriptor) -> Option<u32>;
87 #[cfg(web_sys_unstable_apis)]
88 #[doc = "Change the `sampleCount` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
91 #[doc = ""]
92 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
93 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
94 #[wasm_bindgen(method, setter = "sampleCount")]
95 pub fn set_sample_count(this: &GpuRenderBundleEncoderDescriptor, val: u32);
96 #[cfg(web_sys_unstable_apis)]
97 #[doc = "Get the `depthReadOnly` field of this object."]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
100 #[doc = ""]
101 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
102 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
103 #[wasm_bindgen(method, getter = "depthReadOnly")]
104 pub fn get_depth_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option<bool>;
105 #[cfg(web_sys_unstable_apis)]
106 #[doc = "Change the `depthReadOnly` field of this object."]
107 #[doc = ""]
108 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
109 #[doc = ""]
110 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
111 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
112 #[wasm_bindgen(method, setter = "depthReadOnly")]
113 pub fn set_depth_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool);
114 #[cfg(web_sys_unstable_apis)]
115 #[doc = "Get the `stencilReadOnly` field of this object."]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
118 #[doc = ""]
119 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
121 #[wasm_bindgen(method, getter = "stencilReadOnly")]
122 pub fn get_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor) -> Option<bool>;
123 #[cfg(web_sys_unstable_apis)]
124 #[doc = "Change the `stencilReadOnly` field of this object."]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
127 #[doc = ""]
128 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
129 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
130 #[wasm_bindgen(method, setter = "stencilReadOnly")]
131 pub fn set_stencil_read_only(this: &GpuRenderBundleEncoderDescriptor, val: bool);
132}
133#[cfg(web_sys_unstable_apis)]
134impl GpuRenderBundleEncoderDescriptor {
135 #[doc = "Construct a new `GpuRenderBundleEncoderDescriptor`."]
136 #[doc = ""]
137 #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"]
138 #[doc = ""]
139 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
140 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
141 pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self {
142 #[allow(unused_mut)]
143 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
144 ret.set_color_formats(color_formats);
145 ret
146 }
147 #[cfg(web_sys_unstable_apis)]
148 #[deprecated = "Use `set_label()` instead."]
149 pub fn label(&mut self, val: &str) -> &mut Self {
150 self.set_label(val);
151 self
152 }
153 #[cfg(web_sys_unstable_apis)]
154 #[deprecated = "Use `set_color_formats()` instead."]
155 pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
156 self.set_color_formats(val);
157 self
158 }
159 #[cfg(web_sys_unstable_apis)]
160 #[cfg(feature = "GpuTextureFormat")]
161 #[deprecated = "Use `set_depth_stencil_format()` instead."]
162 pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self {
163 self.set_depth_stencil_format(val);
164 self
165 }
166 #[cfg(web_sys_unstable_apis)]
167 #[deprecated = "Use `set_sample_count()` instead."]
168 pub fn sample_count(&mut self, val: u32) -> &mut Self {
169 self.set_sample_count(val);
170 self
171 }
172 #[cfg(web_sys_unstable_apis)]
173 #[deprecated = "Use `set_depth_read_only()` instead."]
174 pub fn depth_read_only(&mut self, val: bool) -> &mut Self {
175 self.set_depth_read_only(val);
176 self
177 }
178 #[cfg(web_sys_unstable_apis)]
179 #[deprecated = "Use `set_stencil_read_only()` instead."]
180 pub fn stencil_read_only(&mut self, val: bool) -> &mut Self {
181 self.set_stencil_read_only(val);
182 self
183 }
184}