pub trait PersistSpawnWorldExt {
// Required methods
fn spawn_persisted<T: Bundle>(&mut self, bundle: T) -> EntityWorldMut<'_>;
fn spawn_persisted_with_id<T: Bundle>(
&mut self,
id: impl Into<String>,
bundle: T,
) -> EntityWorldMut<'_>;
}Expand description
Ergonomic helpers for spawning persisted entities directly on a World.
Useful for exclusive systems and tests that work with &mut World.
Required Methods§
fn spawn_persisted<T: Bundle>(&mut self, bundle: T) -> EntityWorldMut<'_>
fn spawn_persisted_with_id<T: Bundle>( &mut self, id: impl Into<String>, bundle: T, ) -> EntityWorldMut<'_>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".