Skip to main content

Component

Trait Component 

Source
pub trait Component:
    Component
    + Serialize
    + DeserializeOwned
    + Default
    + Clone {
    const REMOVABLE: bool = true;

    // Provided method
    fn fields(&mut self) -> Vec<Field<'_>> { ... }
}
Expand description

Editor-visible component contract: identity, serde persistence and editable fields. Built-ins are registered in both register_all and crate::registry::Registry. Script libraries may access built-ins but must not register custom unloadable storage.

Provided Associated Constants§

Source

const REMOVABLE: bool = true

Whether the user may remove it in the inspector.

Provided Methods§

Source

fn fields(&mut self) -> Vec<Field<'_>>

Mutable field descriptors used by the Inspector and script property serialization.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§