pub struct World { /* private fields */ }Implementations§
Source§impl World
impl World
pub fn new() -> World
pub fn spawn<B>(&mut self, bundle: B) -> EntityMut<'_>where
B: Bundle,
pub fn entity_mut(&mut self, entity: Entity) -> EntityMut<'_>
pub fn contains(&self, entity: Entity) -> bool
pub fn despawn(&mut self, entity: Entity) -> bool
pub fn get<T>(&self, entity: Entity) -> Option<&T>where
T: Component,
pub fn get_mut<T>(&mut self, entity: Entity) -> Option<&mut T>where
T: Component,
pub fn remove<T>(&mut self, entity: Entity) -> Option<T>where
T: Component,
pub fn insert_resource<T>(&mut self, value: T)where
T: 'static,
pub fn resource<T>(&self) -> &Twhere
T: 'static,
pub fn resource_mut<T>(&mut self) -> &mut Twhere
T: 'static,
pub fn init_resource<T>(&mut self)where
T: Default + 'static,
pub fn contains_resource<T>(&self) -> boolwhere
T: 'static,
pub fn insert_non_send_resource<T>(&mut self, value: T)where
T: 'static,
pub fn get_non_send_resource<T>(&self) -> Option<&T>where
T: 'static,
pub fn get_non_send_resource_mut<T>(&mut self) -> Option<&mut T>where
T: 'static,
pub fn query<Q>(&mut self) -> QueryState<Q>
pub fn query_filtered<Q, F>(&mut self) -> FilteredQueryState<Q, F>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for World
impl !RefUnwindSafe for World
impl !Send for World
impl !Sync for World
impl Unpin for World
impl UnsafeUnpin for World
impl !UnwindSafe for World
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.