Skip to main content

MewShaderStruct

Trait MewShaderStruct 

Source
pub trait MewShaderStruct {
    type Bytes;
    type Inners;

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

Trait for internal use to work with shader 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.

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§