Skip to main content

MewVertexStruct

Trait MewVertexStruct 

Source
pub trait MewVertexStruct {
    type Bytes;
    type Inners;

    // Required methods
    fn from_inners(inners: Self::Inners) -> Self;
    fn from_bytes(bytes: Self::Bytes) -> Self;
    fn zeroed() -> Self;
    fn vertex_layout() -> VertexBufferLayout<'static>;
}
Expand description

Trait for internal use to work with vertex structs.

Required Associated Types§

Source

type Bytes

A byte array ([u8; N]) the same size as the struct.

Source

type Inners

A tuple of all internal types.

Required Methods§

Source

fn from_inners(inners: Self::Inners) -> Self

Build the struct using its internal types.

Source

fn from_bytes(bytes: Self::Bytes) -> Self

Build the struct out of a byte array.

Source

fn zeroed() -> Self

Build a struct with all fields zeroed.

Source

fn vertex_layout() -> VertexBufferLayout<'static>

Get this vertex struct’s wgpu::VertexBufferLayout.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§