Struct bevy_ecs::world::EntityMut[][src]

pub struct EntityMut<'w> { /* fields omitted */ }

Implementations

impl<'w> EntityMut<'w>[src]

pub fn id(&self) -> Entity[src]

pub fn location(&self) -> EntityLocation[src]

pub fn archetype(&self) -> &Archetype[src]

pub fn contains<T: Component>(&self) -> bool[src]

pub fn contains_id(&self, component_id: ComponentId) -> bool[src]

pub fn contains_type_id(&self, type_id: TypeId) -> bool[src]

pub fn get<T: Component>(&self) -> Option<&'w T>[src]

pub fn get_mut<T: Component>(&mut self) -> Option<Mut<'w, T>>[src]

pub unsafe fn get_unchecked_mut<T: Component>(&self) -> Option<Mut<'w, T>>[src]

Safety

This allows aliased mutability. You must make sure this call does not result in multiple mutable references to the same component

pub fn insert_bundle<T: Bundle>(&mut self, bundle: T) -> &mut Self[src]

pub fn remove_bundle<T: Bundle>(&mut self) -> Option<T>[src]

pub fn remove_bundle_intersection<T: Bundle>(&mut self)[src]

Remove any components in the bundle that the entity has.

pub fn insert<T: Component>(&mut self, value: T) -> &mut Self[src]

pub fn remove<T: Component>(&mut self) -> Option<T>[src]

pub fn despawn(self)[src]

pub fn world(&mut self) -> &World[src]

pub unsafe fn world_mut(&mut self) -> &mut World[src]

Safety

Caller must not modify the world in a way that changes the current entity’s location If the caller does do something that could change the location, self.update_location() must be called before using any other methods in EntityMut

pub fn update_location(&mut self)[src]

Updates the internal entity location to match the current location in the internal World. This is only needed if the user called EntityMut::world, which enables the location to change.

Auto Trait Implementations

impl<'w> !RefUnwindSafe for EntityMut<'w>

impl<'w> Send for EntityMut<'w>

impl<'w> Sync for EntityMut<'w>

impl<'w> Unpin for EntityMut<'w>

impl<'w> !UnwindSafe for EntityMut<'w>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Component for T where
    T: 'static + Send + Sync
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,