Struct bevy::ecs::world::EntityMut [−]
Implementations
impl<'w> EntityMut<'w>
pub fn id(&self) -> Entity
pub fn location(&self) -> EntityLocation
pub fn archetype(&self) -> &Archetype
pub fn contains<T>(&self) -> bool where
T: Component,
T: Component,
pub fn contains_id(&self, component_id: ComponentId) -> bool
pub fn contains_type_id(&self, type_id: TypeId) -> bool
pub fn get<T>(&self) -> Option<&'w T> where
T: Component,
T: Component,
pub fn get_mut<T>(&mut self) -> Option<Mut<'w, T>> where
T: Component,
T: Component,
pub unsafe fn get_unchecked_mut<T>(&self) -> Option<Mut<'w, T>> where
T: Component,
T: Component,
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>(&mut self, bundle: T) -> &mut EntityMut<'w> where
T: Bundle,
T: Bundle,
pub fn remove_bundle<T>(&mut self) -> Option<T> where
T: Bundle,
T: Bundle,
pub fn remove_bundle_intersection<T>(&mut self) where
T: Bundle,
T: Bundle,
Remove any components in the bundle that the entity has.
pub fn insert<T>(&mut self, value: T) -> &mut EntityMut<'w> where
T: Component,
T: Component,
pub fn remove<T>(&mut self) -> Option<T> where
T: Component,
T: Component,
pub fn despawn(self)
pub fn world(&mut self) -> &World
pub unsafe fn world_mut(&mut self) -> &mut World
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)
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.
Trait Implementations
impl<'w> BuildWorldChildren for EntityMut<'w>
pub fn with_children(
&mut self,
spawn_children: impl FnOnce(&mut WorldChildBuilder<'_>)
) -> &mut EntityMut<'w>
&mut self,
spawn_children: impl FnOnce(&mut WorldChildBuilder<'_>)
) -> &mut EntityMut<'w>
pub fn push_children(&mut self, children: &[Entity]) -> &mut EntityMut<'w>
pub fn insert_children(
&mut self,
index: usize,
children: &[Entity]
) -> &mut EntityMut<'w>
&mut self,
index: usize,
children: &[Entity]
) -> &mut EntityMut<'w>
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]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> Downcast<T> for T
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Upcast<T> for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,