pub trait SpawnCommands {
    // Required methods
    fn spawn_with<T>(&mut self, spawnable: T) -> EntityCommands<'_>
       where T: 'static + Send + Sync + SpawnOnce;
    fn spawn_with_key(&mut self, key: impl Into<SpawnKey>) -> EntityCommands<'_>;
}
Expand description

Trait used to spawn spawnables either directly or via a SpawnKey using Commands.

Required Methods§

source

fn spawn_with<T>(&mut self, spawnable: T) -> EntityCommands<'_>
where T: 'static + Send + Sync + SpawnOnce,

source

fn spawn_with_key(&mut self, key: impl Into<SpawnKey>) -> EntityCommands<'_>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SpawnCommands for Commands<'_, '_>

source§

fn spawn_with<T>(&mut self, spawnable: T) -> EntityCommands<'_>
where T: 'static + Send + Sync + SpawnOnce,

source§

fn spawn_with_key(&mut self, key: impl Into<SpawnKey>) -> EntityCommands<'_>

Implementors§