pub enum DeferredAction<A> {
RemoveAgent(AgentId),
InsertAgent(A),
}Expand description
An action to apply after the current agent step completes.
Deferred actions avoid borrow conflicts during stepping. They are
collected in a buffer and applied between agent activations. Standard
store-only stepping applies them to the agent store. Spatial stepping
APIs such as StandardModel::step_spatial and
EventQueueModel::step_event_spatial apply the same actions to both the
store and the spatial index transactionally.
Variants§
RemoveAgent(AgentId)
Remove an agent after the current step completes.
InsertAgent(A)
Insert an agent after the current step completes.
Auto Trait Implementations§
impl<A> Freeze for DeferredAction<A>where
A: Freeze,
impl<A> RefUnwindSafe for DeferredAction<A>where
A: RefUnwindSafe,
impl<A> Send for DeferredAction<A>where
A: Send,
impl<A> Sync for DeferredAction<A>where
A: Sync,
impl<A> Unpin for DeferredAction<A>where
A: Unpin,
impl<A> UnsafeUnpin for DeferredAction<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for DeferredAction<A>where
A: UnwindSafe,
Blanket Implementations§
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