Skip to main content

Module view

Module view 

Source
Expand description

The scope accessors: the read and write entry points of a world.

A scope names the entity it is rooted at. It sees that entity, everything below it, and the shared subtree; it does not see its ancestors or its siblings. There is no way up: a scope cannot name the world it came from, so holding one is not a way to reach the rest.

Reading and writing components needs only Scope. Structural changes โ€“ spawning, despawning, relinking โ€“ need ScopeMut, whose operations are confined to the scopeโ€™s own subtree.

Re-exportsยง

use crate::archetype::Archetype; ๐Ÿ”’
use crate::archetype::ScopeSummary; ๐Ÿ”’
use crate::borrow::Claims; ๐Ÿ”’
use crate::bundle::Bundle; ๐Ÿ”’
use crate::command::Commands; ๐Ÿ”’
use crate::entity::Entity; ๐Ÿ”’
use crate::entity::Location; ๐Ÿ”’
use crate::error::ArchetypeAccessError; ๐Ÿ”’
use crate::error::EntityAccessError; ๐Ÿ”’
use crate::info::ArchetypeInfo; ๐Ÿ”’
use crate::info::EntityInfo; ๐Ÿ”’
use crate::info::WorldInfo; ๐Ÿ”’
use crate::query::PlanBuilder; ๐Ÿ”’
use crate::query::Query; ๐Ÿ”’
use crate::query::QueryBorrow; ๐Ÿ”’
use crate::query::QueryOne; ๐Ÿ”’
use crate::world::World; ๐Ÿ”’

Structsยง

Scope
A read-only scope: one entity and everything below it.
ScopeMut
A mutable scope: one entity and everything below it.