pub trait Command {
// Required methods
fn register<B: Bundle>(&mut self);
fn spawn<B: Bundle>(&mut self, b: B) -> Entity;
fn spawn_many<B: Bundle, I: IntoIterator<Item = B>>(
&mut self,
i: I,
) -> Vec<Entity>;
fn alive(&self, entity: Entity) -> Option<bool>;
fn remove(&mut self, entity: Entity) -> bool;
fn fetch<F: WorldFetch>(&mut self, entity: Entity) -> Option<F::Item<'_>>;
}Required Methods§
Sourcefn spawn_many<B: Bundle, I: IntoIterator<Item = B>>(
&mut self,
i: I,
) -> Vec<Entity>
fn spawn_many<B: Bundle, I: IntoIterator<Item = B>>( &mut self, i: I, ) -> Vec<Entity>
Sourcefn fetch<F: WorldFetch>(&mut self, entity: Entity) -> Option<F::Item<'_>>
fn fetch<F: WorldFetch>(&mut self, entity: Entity) -> Option<F::Item<'_>>
在Entity对应的Bundle上进行WorldFetch
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.