SetupWidget

Trait SetupWidget 

Source
pub trait SetupWidget {
    // Required methods
    fn components(&mut self) -> impl Bundle;
    fn build(
        &mut self,
        reactive_data: &HashMap<String, RVal>,
        commands: &mut Commands<'_, '_>,
    ) -> Entity;
    fn rebuild(
        &mut self,
        reactive_data: &HashMap<String, RVal>,
        old_entity: Entity,
        world: &mut World,
    );
}

Required Methods§

Source

fn components(&mut self) -> impl Bundle

get components required for widget.

Source

fn build( &mut self, reactive_data: &HashMap<String, RVal>, commands: &mut Commands<'_, '_>, ) -> Entity

build/spawn the widget into UI world.

Source

fn rebuild( &mut self, reactive_data: &HashMap<String, RVal>, old_entity: Entity, world: &mut World, )

build/spawn the widget into UI world using world instead of commands.

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§