web_sys/features/
gen_GpuTexelCopyTextureInfo.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 = GPUTexelCopyTextureInfo)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuTexelCopyTextureInfo` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`*"]
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 GpuTexelCopyTextureInfo;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "GpuTextureAspect")]
19 #[doc = "Get the `aspect` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `GpuTextureAspect`*"]
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)*"]
25 #[wasm_bindgen(method, getter = "aspect")]
26 pub fn get_aspect(this: &GpuTexelCopyTextureInfo) -> Option<GpuTextureAspect>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "GpuTextureAspect")]
29 #[doc = "Change the `aspect` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `GpuTextureAspect`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "aspect")]
36 pub fn set_aspect(this: &GpuTexelCopyTextureInfo, val: GpuTextureAspect);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `mipLevel` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`*"]
41 #[doc = ""]
42 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "mipLevel")]
45 pub fn get_mip_level(this: &GpuTexelCopyTextureInfo) -> Option<u32>;
46 #[cfg(web_sys_unstable_apis)]
47 #[doc = "Change the `mipLevel` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`*"]
50 #[doc = ""]
51 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "mipLevel")]
54 pub fn set_mip_level(this: &GpuTexelCopyTextureInfo, val: u32);
55 #[cfg(web_sys_unstable_apis)]
56 #[doc = "Get the `origin` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, getter = "origin")]
63 pub fn get_origin(this: &GpuTexelCopyTextureInfo) -> ::wasm_bindgen::JsValue;
64 #[cfg(web_sys_unstable_apis)]
65 #[doc = "Change the `origin` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "origin")]
72 pub fn set_origin(this: &GpuTexelCopyTextureInfo, val: &::wasm_bindgen::JsValue);
73 #[cfg(web_sys_unstable_apis)]
74 #[cfg(feature = "GpuTexture")]
75 #[doc = "Get the `texture` field of this object."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `GpuTexture`*"]
78 #[doc = ""]
79 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
80 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
81 #[wasm_bindgen(method, getter = "texture")]
82 pub fn get_texture(this: &GpuTexelCopyTextureInfo) -> GpuTexture;
83 #[cfg(web_sys_unstable_apis)]
84 #[cfg(feature = "GpuTexture")]
85 #[doc = "Change the `texture` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `GpuTexture`*"]
88 #[doc = ""]
89 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
91 #[wasm_bindgen(method, setter = "texture")]
92 pub fn set_texture(this: &GpuTexelCopyTextureInfo, val: &GpuTexture);
93}
94#[cfg(web_sys_unstable_apis)]
95impl GpuTexelCopyTextureInfo {
96 #[cfg(feature = "GpuTexture")]
97 #[doc = "Construct a new `GpuTexelCopyTextureInfo`."]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `GpuTexelCopyTextureInfo`, `GpuTexture`*"]
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 pub fn new(texture: &GpuTexture) -> Self {
104 #[allow(unused_mut)]
105 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
106 ret.set_texture(texture);
107 ret
108 }
109 #[cfg(web_sys_unstable_apis)]
110 #[cfg(feature = "GpuTextureAspect")]
111 #[deprecated = "Use `set_aspect()` instead."]
112 pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self {
113 self.set_aspect(val);
114 self
115 }
116 #[cfg(web_sys_unstable_apis)]
117 #[deprecated = "Use `set_mip_level()` instead."]
118 pub fn mip_level(&mut self, val: u32) -> &mut Self {
119 self.set_mip_level(val);
120 self
121 }
122 #[cfg(web_sys_unstable_apis)]
123 #[deprecated = "Use `set_origin()` instead."]
124 pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
125 self.set_origin(val);
126 self
127 }
128 #[cfg(web_sys_unstable_apis)]
129 #[cfg(feature = "GpuTexture")]
130 #[deprecated = "Use `set_texture()` instead."]
131 pub fn texture(&mut self, val: &GpuTexture) -> &mut Self {
132 self.set_texture(val);
133 self
134 }
135}