pub trait InspectorOptionsType {
    type DeriveOptions: Default;
    type Options: TypeData + Clone;

    // Required method
    fn options_from_derive(options: Self::DeriveOptions) -> Self::Options;
}
Expand description

Helper trait for the InspectorOptions macro.

    #[inspector(min = 0.0, max = 1.0)]
    field: f32

will expand to this:

let mut options = InspectorOptions::default();
let mut field_options =  <f32 as InspectorOptionsType>::DeriveOptions::default();
field_options.min = Into::into(2.0);
field_options.max = Into::into(3.0);
options.insert(
    Target::Field(0usize),
    <f32 as InspectorOptionsType>::options_from_derive(field_options),
);

Required Associated Types§

source

type DeriveOptions: Default

source

type Options: TypeData + Clone

Can be arbitrary types which will be passed to InspectorEguiImpl like NumberOptions, or nested InspectorOptions which will be passed to children (see impl InspectorOptionsType for Option).

Required Methods§

source

fn options_from_derive(options: Self::DeriveOptions) -> Self::Options

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl InspectorOptionsType for f32

source§

impl InspectorOptionsType for f64

source§

impl InspectorOptionsType for i8

source§

impl InspectorOptionsType for i16

source§

impl InspectorOptionsType for i32

source§

impl InspectorOptionsType for i64

source§

impl InspectorOptionsType for i128

source§

impl InspectorOptionsType for isize

source§

impl InspectorOptionsType for u8

source§

impl InspectorOptionsType for u16

source§

impl InspectorOptionsType for u32

source§

impl InspectorOptionsType for u64

source§

impl InspectorOptionsType for u128

source§

impl InspectorOptionsType for usize

source§

impl InspectorOptionsType for Entity

source§

impl InspectorOptionsType for Quat

source§

impl<T: InspectorOptionsType + 'static> InspectorOptionsType for Range<T>

source§

impl<T: InspectorOptionsType> InspectorOptionsType for Option<T>

source§

impl<T: InspectorOptionsType> InspectorOptionsType for VecDeque<T>

source§

impl<T: InspectorOptionsType> InspectorOptionsType for Vec<T>

source§

impl<T: InspectorOptionsType, const N: usize> InspectorOptionsType for [T; N]

Implementors§