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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    #[wasm_bindgen(method, setter = "minBindingSize")]
52    pub fn set_min_binding_size(this: &GpuBufferBindingLayout, val: f64);
53    #[cfg(web_sys_unstable_apis)]
54    #[cfg(feature = "GpuBufferBindingType")]
55    #[doc = "Get the `type` field of this object."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"]
58    #[doc = ""]
59    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
61    #[wasm_bindgen(method, getter = "type")]
62    pub fn get_type(this: &GpuBufferBindingLayout) -> Option<GpuBufferBindingType>;
63    #[cfg(web_sys_unstable_apis)]
64    #[cfg(feature = "GpuBufferBindingType")]
65    #[doc = "Change the `type` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"]
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 = "type")]
72    pub fn set_type(this: &GpuBufferBindingLayout, val: GpuBufferBindingType);
73}
74#[cfg(web_sys_unstable_apis)]
75impl GpuBufferBindingLayout {
76    #[doc = "Construct a new `GpuBufferBindingLayout`."]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"]
79    #[doc = ""]
80    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
82    pub fn new() -> Self {
83        #[allow(unused_mut)]
84        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
85        ret
86    }
87    #[cfg(web_sys_unstable_apis)]
88    #[deprecated = "Use `set_has_dynamic_offset()` instead."]
89    pub fn has_dynamic_offset(&mut self, val: bool) -> &mut Self {
90        self.set_has_dynamic_offset(val);
91        self
92    }
93    #[cfg(web_sys_unstable_apis)]
94    #[deprecated = "Use `set_min_binding_size()` instead."]
95    pub fn min_binding_size(&mut self, val: f64) -> &mut Self {
96        self.set_min_binding_size(val);
97        self
98    }
99    #[cfg(web_sys_unstable_apis)]
100    #[cfg(feature = "GpuBufferBindingType")]
101    #[deprecated = "Use `set_type()` instead."]
102    pub fn type_(&mut self, val: GpuBufferBindingType) -> &mut Self {
103        self.set_type(val);
104        self
105    }
106}
107#[cfg(web_sys_unstable_apis)]
108impl Default for GpuBufferBindingLayout {
109    fn default() -> Self {
110        Self::new()
111    }
112}