---
source: wgsl_bindgen/src/structs.rs
---
#[repr(C, align(4))]
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct Input0 {
#[doc = "offset: 0, size: 4, type: `u32`"]
pub a: u32,
pub _pad_a: [u8; 0x4],
#[doc = "offset: 8, size: 4, type: `i32`"]
pub b: i32,
pub _pad_b: [u8; 0x14],
#[doc = "offset: 32, size: 4, type: `f32`"]
pub c: f32,
pub _pad_d: [u8; 0x1C],
}
impl Input0 {
pub const fn new(a: u32, b: i32, c: f32) -> Self {
Self {
a,
_pad_a: [0; 0x4],
b,
_pad_b: [0; 0x14],
c,
_pad_d: [0; 0x1C],
}
}
}
#[repr(C)]
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct Input0Init {
pub a: u32,
pub b: i32,
pub c: f32,
}
impl Input0Init {
pub fn build(&self) -> Input0 {
Input0 {
a: self.a,
_pad_a: [0; 0x4],
b: self.b,
_pad_b: [0; 0x14],
c: self.c,
_pad_d: [0; 0x1C],
}
}
}
impl From<Input0Init> for Input0 {
fn from(data: Input0Init) -> Self {
data.build()
}
}
const INPUT0_ASSERTS: () = {
assert!(std::mem::offset_of!(Input0, a) == 0);
assert!(std::mem::offset_of!(Input0, b) == 8);
assert!(std::mem::offset_of!(Input0, c) == 32);
assert!(std::mem::size_of::<Input0>() == 64);
};
unsafe impl bytemuck::Zeroable for Input0 {}
unsafe impl bytemuck::Pod for Input0 {}
#[repr(C, align(4))]
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct Inner {
#[doc = "offset: 0, size: 4, type: `f32`"]
pub a: f32,
}
impl Inner {
pub const fn new(a: f32) -> Self {
Self { a }
}
}
const INNER_ASSERTS: () = {
assert!(std::mem::offset_of!(Inner, a) == 0);
assert!(std::mem::size_of::<Inner>() == 4);
};
unsafe impl bytemuck::Zeroable for Inner {}
unsafe impl bytemuck::Pod for Inner {}
#[repr(C, align(4))]
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct Outer {
#[doc = "offset: 0, size: 4, type: `Inner`"]
pub inner: Inner,
}
impl Outer {
pub const fn new(inner: Inner) -> Self {
Self { inner }
}
}
const OUTER_ASSERTS: () = {
assert!(std::mem::offset_of!(Outer, inner) == 0);
assert!(std::mem::size_of::<Outer>() == 4);
};
unsafe impl bytemuck::Zeroable for Outer {}
unsafe impl bytemuck::Pod for Outer {}