Struct chunked::snapshot::Snapshot [−][src]
pub struct Snapshot { /* fields omitted */ }
A snapshot of the state of the world.
Implementations
impl Snapshot
[src]
impl Snapshot
[src]pub fn universe(&self) -> &Arc<Universe>
[src]
pub fn universe(&self) -> &Arc<Universe>
[src]Get a weak reference to the owning universe of this snapshot.
pub fn chunk_sets(&self) -> &[ChunkSet]ⓘ
[src]
pub fn chunk_sets(&self) -> &[ChunkSet]ⓘ
[src]Get all the ChunkSet
s in this snapshot.
pub fn par_iter_chunk_sets(&self) -> impl ParallelIterator<Item = &ChunkSet>
[src]
pub fn par_iter_chunk_sets(&self) -> impl ParallelIterator<Item = &ChunkSet>
[src]Create a parallel iterator over the chunks in the snapshot.
pub fn iter_chunk_sets(&self) -> impl Iterator<Item = &ChunkSet>
[src]
pub fn iter_chunk_sets(&self) -> impl Iterator<Item = &ChunkSet>
[src]Create an iterator over all chunk sets.
pub fn par_iter_chunks(&self) -> impl ParallelIterator<Item = &Arc<Chunk>>
[src]
pub fn par_iter_chunks(&self) -> impl ParallelIterator<Item = &Arc<Chunk>>
[src]Create a parallel iterator over the chunks in the snapshot.
pub fn iter_chunks(&self) -> impl Iterator<Item = &Arc<Chunk>>
[src]
pub fn iter_chunks(&self) -> impl Iterator<Item = &Arc<Chunk>>
[src]Create an iterator over all the chunks in the snapshot.
pub fn chunk_set(&self, a: &Arc<Archetype>) -> Option<&ChunkSet>
[src]
pub fn chunk_set(&self, a: &Arc<Archetype>) -> Option<&ChunkSet>
[src]Get the ChunkSet
for a particular archetype.
pub fn entity(&self, id: EntityID) -> Option<EntityEntry>
[src]
pub fn entity(&self, id: EntityID) -> Option<EntityEntry>
[src]Get an EntityEntry
for the entity with the given ID.
Returns None if the entity doesn’t exist in this snapshot.
pub fn modify<'a, E>(self: &mut Arc<Self>, edits: E) where
E: Iterator<Item = Edit<'a>>,
[src]
pub fn modify<'a, E>(self: &mut Arc<Self>, edits: E) where
E: Iterator<Item = Edit<'a>>,
[src]Modify this snapshot, producing another snapshot, with the given edit list applied.
If this is the only Arc
to this snapshot, the memory will be reused. This is
also true of the contained ChunkSet
s and Chunk
s.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnwindSafe for Snapshot
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more