Skip to main content

IStructType

Trait IStructType 

Source
pub trait IStructType: Copy {
    type Field: IField;

    // Required methods
    fn field_count(&self) -> usize;
    fn field(&self, idx: usize) -> Option<Self::Field>;
}
Expand description

Interface for struct type information.

Required Associated Types§

Source

type Field: IField

The field type.

Required Methods§

Source

fn field_count(&self) -> usize

Number of fields in this struct.

Source

fn field(&self, idx: usize) -> Option<Self::Field>

Get field by index.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IStructType for &'static StructType

Source§

type Field = &'static Field

Source§

fn field_count(&self) -> usize

Source§

fn field(&self, idx: usize) -> Option<Self::Field>

Implementors§