pub struct Entity { /* private fields */ }
Expand description
Represents an entity which constists of multiple components
Implementations
sourceimpl Entity
impl Entity
sourcepub fn remove<T>(&mut self) -> Option<T> where
T: Component,
pub fn remove<T>(&mut self) -> Option<T> where
T: Component,
Removes a component from an entity
sourcepub fn get<T>(&self) -> Option<RwLockReadGuard<'_, T>> where
T: Component,
pub fn get<T>(&self) -> Option<RwLockReadGuard<'_, T>> where
T: Component,
Returns read access to a component
sourcepub fn get_mut<T>(&self) -> Option<RwLockWriteGuard<'_, T>> where
T: Component,
pub fn get_mut<T>(&self) -> Option<RwLockWriteGuard<'_, T>> where
T: Component,
Returns write access to a component
Auto Trait Implementations
impl !RefUnwindSafe for Entity
impl !Send for Entity
impl !Sync for Entity
impl Unpin for Entity
impl !UnwindSafe for Entity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more