]>
git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_GpuImageCopyTexture.rs
1 #![allow(unused_imports)]
4 use wasm_bindgen
::prelude
::*;
5 #[cfg(web_sys_unstable_apis)]
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUImageCopyTexture)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuImageCopyTexture` dictionary."]
12 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"]
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
;
18 #[cfg(web_sys_unstable_apis)]
19 impl GpuImageCopyTexture
{
20 #[cfg(feature = "GpuTexture")]
21 #[doc = "Construct a new `GpuImageCopyTexture`."]
23 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"]
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 {
29 let mut ret
: Self = ::wasm_bindgen
::JsCast
::unchecked_into(::js_sys
::Object
::new());
33 #[cfg(web_sys_unstable_apis)]
34 #[cfg(feature = "GpuTextureAspect")]
35 #[doc = "Change the `aspect` field of this object."]
37 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"]
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
;
44 ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("aspect"), &JsValue
::from(val
));
47 "setting properties should never fail on our dictionary objects"
52 #[cfg(web_sys_unstable_apis)]
53 #[doc = "Change the `mipLevel` field of this object."]
55 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"]
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(
63 &JsValue
::from("mipLevel"),
68 "setting properties should never fail on our dictionary objects"
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Change the `origin` field of this object."]
76 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"]
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
;
83 ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("origin"), &JsValue
::from(val
));
86 "setting properties should never fail on our dictionary objects"
91 #[cfg(web_sys_unstable_apis)]
92 #[cfg(feature = "GpuTexture")]
93 #[doc = "Change the `texture` field of this object."]
95 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"]
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(
103 &JsValue
::from("texture"),
108 "setting properties should never fail on our dictionary objects"