pub trait DslBundle: Default {
// Required method
fn insert(&mut self, cmds: &mut EntityCommands<'_, '_, '_>);
// Provided method
fn node(
&mut self,
cmds: &mut EntityCommands<'_, '_, '_>,
f: impl FnOnce(&mut ChildBuilder<'_, '_, '_>),
) { ... }
}Expand description
Required Methods§
Sourcefn insert(&mut self, cmds: &mut EntityCommands<'_, '_, '_>)
fn insert(&mut self, cmds: &mut EntityCommands<'_, '_, '_>)
Add given Bundle to the entity.
Provided Methods§
Sourcefn node(
&mut self,
cmds: &mut EntityCommands<'_, '_, '_>,
f: impl FnOnce(&mut ChildBuilder<'_, '_, '_>),
)
fn node( &mut self, cmds: &mut EntityCommands<'_, '_, '_>, f: impl FnOnce(&mut ChildBuilder<'_, '_, '_>), )
Spawn the entity as a parent of other entities.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".