pub struct Chunk<'a, V: for<'b> View<'b>> { /* private fields */ }Expand description
A type-safe view of a chunk of entities all of the same data layout.
Implementations§
Source§impl<'a, V: for<'b> View<'b>> Chunk<'a, V>
impl<'a, V: for<'b> View<'b>> Chunk<'a, V>
pub fn new( archetype: &'a ArchetypeData, set_index: SetIndex, chunk_index: ChunkIndex, ) -> Self
Sourcepub fn iter_mut(&mut self) -> <V as View<'a>>::Iter
pub fn iter_mut(&mut self) -> <V as View<'a>>::Iter
Get an iterator of all data contained within the chunk.
Sourcepub fn iter_entities_mut(&mut self) -> ZipEntities<'a, V> ⓘ
pub fn iter_entities_mut(&mut self) -> ZipEntities<'a, V> ⓘ
Get an iterator of all data and entity IDs contained within the chunk.
Auto Trait Implementations§
impl<'a, V> Freeze for Chunk<'a, V>
impl<'a, V> !RefUnwindSafe for Chunk<'a, V>
impl<'a, V> Send for Chunk<'a, V>
impl<'a, V> Sync for Chunk<'a, V>
impl<'a, V> Unpin for Chunk<'a, V>where
V: Unpin,
impl<'a, V> UnsafeUnpin for Chunk<'a, V>
impl<'a, V> !UnwindSafe for Chunk<'a, V>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more