pub fn write_std430<T>(&mut self, value: &T) -> io::Result<usize>
    where
        T: Std430,
    {
        let padding = align_offset(self.offset, T::ALIGNMENT);

        for _ in 0..padding {
            self.writer.write_all(&[0])?;
        }
        self.offset += padding;

        let value = value.as_std430();
        self.writer.write_all(bytes_of(&value))?;

        let write_here = self.offset;
        self.offset += size_of::<T>();

        Ok(write_here)
    }
/// Write an `Std430` type to the underlying buffer.
Write an `Std430` type to the underlying buffer.
Write an ` Std430 ` type to the underlying buffer .
pub fn write_std430<T>(&mut self, value: &T) -> io::Result<usize>
    where
        T: Std430,
    {
        let padding = align_offset(self.offset, T::ALIGNMENT);
        for _ in 0..padding {
            self.writer.write_all(&[0])?;
        }
        self.offset += padding;
        let value = value.as_std430();
        self.writer.write_all(bytes_of(&value))?;
        let write_here = self.offset;
        self.offset += size_of::<T>();
        Ok(write_here)
    }
pub fn write_std430 < T > ( & mut self , value : & T ) -> io :: Result < usize > where T : Std430 , { let padding = align_offset ( self . offset , T :: ALIGNMENT ) ; for _ in 0 .. padding { self . writer . write_all ( & [ 0 ] ) ? ; } self . offset += padding ; let value = value . as_std430 ( ) ; self . writer . write_all ( bytes_of ( & value ) ) ? ; let write_here = self . offset ; self . offset += size_of :: < T > ( ) ; Ok ( write_here ) }
Write an `Std430` type to the underlying buffer.
Write an ` Std430 ` type to the underlying buffer .
&mut self
value
&T
&mut self
value
&T