Expand description
The errors an access that named an entity or an archetype answers with.
Every lookup that names an entity answers Result rather than Option.
A handle travels over wires, save files and scope boundaries, so a lookup can
be turned down for reasons a caller has to tell apart: the entity is gone, it
is alive but out of the scope’s reach, or its archetype does not carry what
was asked for. Option collapses all of them into one silence.
A structural change is answered the same way. Despawning and relinking are turned down for reasons of their own - the entity is out of the subtree, it is shared, it is scaffolding - and a caller that was refused has to know which it was: the answer to “not yours” is to ask the scope that owns it, and the answer to “scaffolding” is to stop asking.
A borrow conflict is deliberately not one of these. It says nothing about the
handle, only that another holder has already claimed the component, and it
stays a panic; see the module documentation of crate.
Re-exports§
use crate::Entity;🔒
Enums§
- Archetype
Access Error - Why a lookup by archetype id was turned down.
- Entity
Access Error - Why a lookup of, or through, an entity handle was turned down.