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

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

Required Methods§

source

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

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SpawnWorld for World

source§

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

source§

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

Implementors§