Trait StructReflect

Source
pub trait StructReflect {
    const TYPE: StructType;
    const FIELD_NAMES: &'static [&'static str];

    // Required method
    fn try_get_index_of_field(field_name: &str) -> Result<usize, ReflectError>;

    // Provided method
    fn get_index_of_field(field_name: &str) -> usize { ... }
}

Required Associated Constants§

Source

const TYPE: StructType

Source

const FIELD_NAMES: &'static [&'static str]

Required Methods§

Provided Methods§

Source

fn get_index_of_field(field_name: &str) -> usize

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§