pub enum AgentAccess {
Exclusive,
Isolated,
SharedWorld,
}Expand description
An agent’s data-access footprint during Agent::execute, used by the
scheduler’s parallel executor to decide which agents may run concurrently.
The default (Exclusive) is the safe fallback: the agent
may touch the ECS World mutably (or a shared mutable resource), so it must
run serially. Only an agent that provably confines itself to reading the
LaneBus and writing its own OutputDeck should declare
Isolated.
Variants§
Exclusive
Needs exclusive &mut World (or mutates a shared resource); runs
serially. The safe default.
Isolated
Touches no World and writes only its own OutputDeck — no shared
mutable engine resources. Eligible for concurrent execution: the
scheduler runs it with WorldAccess::None
and a private deck shard, folded back into the shared deck after the
concurrent wave. Any number may run in the same wave.
Reads the World immutably (never mutates it) and may write shared
engine resources. The scheduler runs it with a shared
WorldAccess::Shared reference so many
world-readers execute concurrently. Because it may write shared
resources whose ordering matters, at most one SharedWorld agent runs
per wave (alongside any number of Isolated agents).
Trait Implementations§
Source§impl Clone for AgentAccess
impl Clone for AgentAccess
Source§fn clone(&self) -> AgentAccess
fn clone(&self) -> AgentAccess
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentAccess
impl Debug for AgentAccess
Source§impl Default for AgentAccess
impl Default for AgentAccess
Source§fn default() -> AgentAccess
fn default() -> AgentAccess
Source§impl PartialEq for AgentAccess
impl PartialEq for AgentAccess
Source§fn eq(&self, other: &AgentAccess) -> bool
fn eq(&self, other: &AgentAccess) -> bool
self and other values to be equal, and is used by ==.impl Copy for AgentAccess
impl Eq for AgentAccess
impl StructuralPartialEq for AgentAccess
Auto Trait Implementations§
impl Freeze for AgentAccess
impl RefUnwindSafe for AgentAccess
impl Send for AgentAccess
impl Sync for AgentAccess
impl Unpin for AgentAccess
impl UnsafeUnpin for AgentAccess
impl UnwindSafe for AgentAccess
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.