pub struct GpuEncoder<W: Write> { /* private fields */ }Expand description
The state for encoding values for wgsl
Implementations§
Source§impl<W: Write> GpuEncoder<W>
impl<W: Write> GpuEncoder<W>
Sourcepub fn align_to(&mut self, align: usize) -> Result<()>
pub fn align_to(&mut self, align: usize) -> Result<()>
Adds zero-initialized padding such that the next write call will be aligned to the given value.
Sourcepub fn struct_align<T: GpuLayout>(
&mut self,
f: impl FnOnce(&mut Self) -> Result<()>,
) -> Result<()>
pub fn struct_align<T: GpuLayout>( &mut self, f: impl FnOnce(&mut Self) -> Result<()>, ) -> Result<()>
Aligns and pads based on the wgsl structure alignment specification
Auto Trait Implementations§
impl<W> Freeze for GpuEncoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for GpuEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for GpuEncoder<W>where
W: Send,
impl<W> Sync for GpuEncoder<W>where
W: Sync,
impl<W> Unpin for GpuEncoder<W>where
W: Unpin,
impl<W> UnsafeUnpin for GpuEncoder<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for GpuEncoder<W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more