Skip to main content

web_sys/features/
gen_GpuBufferBindingLayout.rs

1#![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 = GPUBufferBindingLayout)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `GpuBufferBindingLayout` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type GpuBufferBindingLayout;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `hasDynamicOffset` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "hasDynamicOffset")]
25    pub fn get_has_dynamic_offset(this: &GpuBufferBindingLayout) -> Option<bool>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `hasDynamicOffset` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "hasDynamicOffset")]
34    pub fn set_has_dynamic_offset(this: &GpuBufferBindingLayout, val: bool);
35    #[cfg(web_sys_unstable_apis)]
36    #[doc = "Get the `minBindingSize` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    #[wasm_bindgen(method, getter = "minBindingSize")]
43    pub fn get_min_binding_size(this: &GpuBufferBindingLayout) -> Option<f64>;
44    #[cfg(web_sys_unstable_apis)]
45    #[doc = "Change the `minBindingSize` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    #[wasm_bindgen(method, setter = "minBindingSize")]
52    pub fn set_min_binding_size(this: &GpuBufferBindingLayout, val: u32);
53    #[cfg(web_sys_unstable_apis)]
54    #[doc = "Change the `minBindingSize` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
57    #[doc = ""]
58    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
60    #[wasm_bindgen(method, setter = "minBindingSize")]
61    pub fn set_min_binding_size_f64(this: &GpuBufferBindingLayout, val: f64);
62    #[cfg(web_sys_unstable_apis)]
63    #[cfg(feature = "GpuBufferBindingType")]
64    #[doc = "Get the `type` field of this object."]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"]
67    #[doc = ""]
68    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
69    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
70    #[wasm_bindgen(method, getter = "type")]
71    pub fn get_type(this: &GpuBufferBindingLayout) -> Option<GpuBufferBindingType>;
72    #[cfg(web_sys_unstable_apis)]
73    #[cfg(feature = "GpuBufferBindingType")]
74    #[doc = "Change the `type` field of this object."]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
80    #[wasm_bindgen(method, setter = "type")]
81    pub fn set_type(this: &GpuBufferBindingLayout, val: GpuBufferBindingType);
82}
83#[cfg(web_sys_unstable_apis)]
84impl GpuBufferBindingLayout {
85    #[doc = "Construct a new `GpuBufferBindingLayout`."]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
91    pub fn new() -> Self {
92        #[allow(unused_mut)]
93        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
94        ret
95    }
96    #[cfg(web_sys_unstable_apis)]
97    #[deprecated = "Use `set_has_dynamic_offset()` instead."]
98    pub fn has_dynamic_offset(&mut self, val: bool) -> &mut Self {
99        self.set_has_dynamic_offset(val);
100        self
101    }
102    #[cfg(web_sys_unstable_apis)]
103    #[deprecated = "Use `set_min_binding_size()` instead."]
104    pub fn min_binding_size(&mut self, val: u32) -> &mut Self {
105        self.set_min_binding_size(val);
106        self
107    }
108    #[cfg(web_sys_unstable_apis)]
109    #[cfg(feature = "GpuBufferBindingType")]
110    #[deprecated = "Use `set_type()` instead."]
111    pub fn type_(&mut self, val: GpuBufferBindingType) -> &mut Self {
112        self.set_type(val);
113        self
114    }
115}
116#[cfg(web_sys_unstable_apis)]
117impl Default for GpuBufferBindingLayout {
118    fn default() -> Self {
119        Self::new()
120    }
121}