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§
const TYPE: StructType
const FIELD_NAMES: &'static [&'static str]
Required Methods§
fn try_get_index_of_field(field_name: &str) -> Result<usize, ReflectError>
Provided Methods§
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.