pub struct Entity { /* private fields */ }
Implementations§
Source§impl Entity
impl Entity
pub fn new() -> Self
pub fn add<T: Component>(&mut self, component: T)
pub fn has<T: Component>(&self) -> bool
pub fn remove<T: Component>(&mut self) -> Option<T>
pub fn query<Q: Query>(&self) -> EntityQuery<'_, Q>
pub fn filter<F: Filter>(&self, filter: F) -> FilteredEntity<'_, F>
pub fn is<F: Filter>(&mut self, filter: F) -> bool
pub unsafe fn borrow<T: Component>(&self) -> Option<Borrow<'_, T>>
pub unsafe fn borrow_mut<T: Component>(&self) -> Option<BorrowMut<'_, T>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entity
impl !RefUnwindSafe for Entity
impl !Send for Entity
impl !Sync for Entity
impl Unpin for Entity
impl !UnwindSafe for Entity
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