pub enum WorldAccess<'a> {
None,
Shared(&'a dyn Any),
Exclusive(&'a mut dyn Any),
}Expand description
How an agent’s execute may reach the ECS World this frame, granted by
the scheduler according to the agent’s
Agent::access declaration.
The parallel executor uses this to hand a serial (Exclusive) agent a
mutable world while giving concurrently-running read-only (Shared) agents
a shared reference — World is Sync, so many &World readers are safe,
but a mutable borrow must be exclusive.
Variants§
None
No world access — the agent reads only the LaneBus and writes its deck.
Shared, read-only world. Multiple Shared agents may run concurrently.
Exclusive(&'a mut dyn Any)
Exclusive, mutable world. The agent runs serially.
Auto Trait Implementations§
impl<'a> Freeze for WorldAccess<'a>
impl<'a> !RefUnwindSafe for WorldAccess<'a>
impl<'a> !Send for WorldAccess<'a>
impl<'a> !Sync for WorldAccess<'a>
impl<'a> Unpin for WorldAccess<'a>
impl<'a> UnsafeUnpin for WorldAccess<'a>
impl<'a> !UnwindSafe for WorldAccess<'a>
Blanket Implementations§
Source§impl<T> AppLifecycle for Twhere
T: ?Sized,
impl<T> AppLifecycle for Twhere
T: ?Sized,
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