pub struct ColumnMut<'a, T: Component> { /* private fields */ }
Expand description
Uniquely borrows every T
component in a world
Implementations
sourceimpl<'a, T: Component> ColumnMut<'a, T>
impl<'a, T: Component> ColumnMut<'a, T>
sourcepub fn get(&mut self, entity: Entity) -> Result<&mut T, ComponentError>
pub fn get(&mut self, entity: Entity) -> Result<&mut T, ComponentError>
Access the T
component of entity
sourcepub unsafe fn get_unchecked(
&self,
entity: Entity
) -> Result<&mut T, ComponentError>
pub unsafe fn get_unchecked(
&self,
entity: Entity
) -> Result<&mut T, ComponentError>
Access the T
component of entity
without unique access to self
. Allows simultaneous
access to the components of multiple entities.
Safety
Must not be invoked while a borrow to any part of the same T
is live, e.g. due to a prior
call to get_unchecked
on the same entity.
Trait Implementations
impl<'a, T: Component> Send for ColumnMut<'a, T>
impl<'a, T: Component> Sync for ColumnMut<'a, T>
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for ColumnMut<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Unpin for ColumnMut<'a, T> where
T: Unpin,
impl<'a, T> UnwindSafe for ColumnMut<'a, T> where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more