AttrStruct

Trait AttrStruct 

Source
pub trait AttrStruct {
    // Required methods
    fn fields_count() -> usize;
    fn field_gl_name(i: usize) -> &'static str;
    fn field_offset(i: usize) -> usize;
    fn field_type(i: usize) -> u32;
    fn field_num_comps(i: usize) -> usize;
    fn field_normalized(i: usize) -> bool;
}
Expand description

The trait implemented by attribute structs.

Methods in this struct describe the structure of the fields.

Required Methods§

Source

fn fields_count() -> usize

The number of fields in the struct

Source

fn field_gl_name(i: usize) -> &'static str

The GLSL name of the attribute corresponding to field i

Source

fn field_offset(i: usize) -> usize

The offset of field i in the struct in bytes

Source

fn field_type(i: usize) -> u32

The base type of field i in the struct with constants like WebGlRenderingContext::BYTE

Source

fn field_num_comps(i: usize) -> usize

The number of components for the type in field i

Source

fn field_normalized(i: usize) -> bool

Whether the field i should be normalized

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§