Skip to main content

Module command

Module command 

Source
Expand description

Bounded command queue for off-main-thread mutations of ECS state.

Structs§

CommandQueue
Producer-side ECS resource. Cloneable for sharing across worker threads.
CommandQueueOverflow
Message emitted when CommandQueue::try_push returns Err because the queue is full.
CommandReceiver
Consumer-side ECS resource, registered as a non-Send resource since the drain runs on the main thread.
CommandRegistry
Resource holding the per-TypeId handler table for Command::Typed.

Enums§

Command
A deferred command applied during TickStage::CommandDrain.

Constants§

DEFAULT_QUEUE_CAPACITY
Default queue capacity. Override via CommandQueue::with_capacity.

Functions§

apply_property_commands
Drains Command::SetProperty and Command::Typed entries from the CommandReceiver and applies them to the PropertyStore / CommandRegistry respectively.

Type Aliases§

CommandHandlerFn
Handler invoked when a Command::Typed with a matching TypeId is drained.