Skip to main content

Inspectable

Trait Inspectable 

Source
pub trait Inspectable {
    // Required methods
    fn inspect(&self) -> Vec<PropertyGroup>;
    fn apply_edit(
        &mut self,
        entry_name: &str,
        serialized_value: &str,
    ) -> Result<(), String>;
    fn type_name(&self) -> &'static str;
}
Expand description

Implement this trait to make a type editable in the inspector.

Required Methods§

Source

fn inspect(&self) -> Vec<PropertyGroup>

Returns the property groups for this type.

Source

fn apply_edit( &mut self, entry_name: &str, serialized_value: &str, ) -> Result<(), String>

Apply an edited entry value back to self (by entry name + serialized value).

Source

fn type_name(&self) -> &'static str

Human-readable type name.

Implementors§