Skip to main content

wgpu/backend/webgpu/webgpu_sys/
gen_GpuTextureView.rs

1// DO NOT EDIT THIS FILE!
2//
3// This module part of a subset of web-sys that is used by wgpu's webgpu backend.
4//
5// These bindings are vendored into wgpu for the sole purpose of letting
6// us pin the WebGPU backend to a specific version of the bindings, not
7// to enable local changes. There are no provisions to preserve changes
8// you make here the next time we re-vendor the bindings.
9//
10// The `web-sys` crate does not treat breaking changes to the WebGPU API
11// as semver breaking changes, as WebGPU is "unstable". This means Cargo
12// will not let us mix versions of `web-sys`, pinning WebGPU bindings to
13// a specific version, while letting other bindings like WebGL get
14// updated. Vendoring WebGPU was the workaround we chose.
15//
16// Vendoring also allows us to avoid building `web-sys` with
17// `--cfg=web_sys_unstable_apis`, needed to get the WebGPU bindings.
18//
19// If you want to improve the generated code, please submit a PR to the https://github.com/wasm-bindgen/wasm-bindgen repository.
20//
21// This file was generated by the `cargo xtask vendor-web-sys --version 0.2.127` command.
22#![allow(unused_imports)]
23#![allow(clippy::all)]
24use super::*;
25use wasm_bindgen::prelude::*;
26
27#[wasm_bindgen]
28extern "C" {
29    #[wasm_bindgen(
30        extends = "::js_sys::Object",
31        js_name = "GPUTextureView",
32        typescript_type = "GPUTextureView"
33    )]
34    #[derive(Debug, Clone, PartialEq, Eq)]
35    #[doc = "The `GpuTextureView` class."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTextureView)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `GpuTextureView`*"]
40    #[doc = ""]
41    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
43    pub type GpuTextureView;
44
45    #[wasm_bindgen(method, getter, js_class = "GPUTextureView", js_name = "label")]
46    #[doc = "Getter for the `label` field of this object."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTextureView/label)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `GpuTextureView`*"]
51    #[doc = ""]
52    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
54    pub fn label(this: &GpuTextureView) -> ::alloc::string::String;
55
56    #[wasm_bindgen(method, setter, js_class = "GPUTextureView", js_name = "label")]
57    #[doc = "Setter for the `label` field of this object."]
58    #[doc = ""]
59    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTextureView/label)"]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `GpuTextureView`*"]
62    #[doc = ""]
63    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
64    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
65    pub fn set_label(this: &GpuTextureView, value: &str);
66}