]> git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_GpuImageCopyTexture.rs
New upstream version 1.72.1+dfsg1
[rustc.git] / vendor / web-sys / src / features / gen_GpuImageCopyTexture.rs
1 #![allow(unused_imports)]
2 #![allow(clippy::all)]
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 = GPUImageCopyTexture)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuImageCopyTexture` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"]
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 GpuImageCopyTexture;
17 }
18 #[cfg(web_sys_unstable_apis)]
19 impl GpuImageCopyTexture {
20 #[cfg(feature = "GpuTexture")]
21 #[doc = "Construct a new `GpuImageCopyTexture`."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"]
24 #[doc = ""]
25 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
27 pub fn new(texture: &GpuTexture) -> Self {
28 #[allow(unused_mut)]
29 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
30 ret.texture(texture);
31 ret
32 }
33 #[cfg(web_sys_unstable_apis)]
34 #[cfg(feature = "GpuTextureAspect")]
35 #[doc = "Change the `aspect` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"]
38 #[doc = ""]
39 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
41 pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self {
42 use wasm_bindgen::JsValue;
43 let r =
44 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("aspect"), &JsValue::from(val));
45 debug_assert!(
46 r.is_ok(),
47 "setting properties should never fail on our dictionary objects"
48 );
49 let _ = r;
50 self
51 }
52 #[cfg(web_sys_unstable_apis)]
53 #[doc = "Change the `mipLevel` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"]
56 #[doc = ""]
57 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
58 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
59 pub fn mip_level(&mut self, val: u32) -> &mut Self {
60 use wasm_bindgen::JsValue;
61 let r = ::js_sys::Reflect::set(
62 self.as_ref(),
63 &JsValue::from("mipLevel"),
64 &JsValue::from(val),
65 );
66 debug_assert!(
67 r.is_ok(),
68 "setting properties should never fail on our dictionary objects"
69 );
70 let _ = r;
71 self
72 }
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Change the `origin` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"]
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 pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
81 use wasm_bindgen::JsValue;
82 let r =
83 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("origin"), &JsValue::from(val));
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 #[cfg(feature = "GpuTexture")]
93 #[doc = "Change the `texture` field of this object."]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"]
96 #[doc = ""]
97 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
99 pub fn texture(&mut self, val: &GpuTexture) -> &mut Self {
100 use wasm_bindgen::JsValue;
101 let r = ::js_sys::Reflect::set(
102 self.as_ref(),
103 &JsValue::from("texture"),
104 &JsValue::from(val),
105 );
106 debug_assert!(
107 r.is_ok(),
108 "setting properties should never fail on our dictionary objects"
109 );
110 let _ = r;
111 self
112 }
113 }