Module legion::systems[][src]

Automatic query scheduling and parallel execution.

Structs

Builder

A factory for Schedule.

CommandBuffer

A command buffer used to queue mutable changes to the world from a system. This buffer is automatically flushed and refreshed at the beginning of every frame by Schedule. If Schedule is not used, then the user needs to manually flush it by performing CommandBuffer::flush.

Executor

Executes a sequence of systems, potentially in parallel, and then commits their command buffers.

ResourceTypeId

Unique ID for a resource.

Resources

Resources container. Shared resources stored here can be retrieved in systems.

Schedule

A schedule of systems for execution.

SyncResources

A resource collection which is Send and Sync, but which only allows access to resources which are Sync.

System

The concrete type which contains the system closure provided by the user. This struct should not be constructed directly, and instead should be created using SystemBuilder.

SystemAccess

Structure describing the resource and component access conditions of the system.

SystemBuilder

A low level builder for constructing systems.

SystemId

A diagnostic identifier for a system.

UnsafeResources

A container for resources which performs runtime borrow checking but does not ensure that !Sync resources aren’t accessed across threads.

Enums

Step

A step in a schedule.

Traits

ParallelRunnable

A Runnable which is also Send and Sync.

QuerySet

Provides an abstraction across tuples of queries for system closures.

Resource

Blanket trait for resource types.

ResourceSet

Trait which is implemented for tuples of resources and singular resources. This abstracts fetching resources to allow for ergonomic fetching.

Runnable

Trait describing a schedulable type. This is implemented by System

SystemFn

A function which can provide the body of a system.

WorldWritable

This trait can be used to implement custom world writer types that can be directly inserted into the command buffer, for more custom and complex world operations. This is analogous to the CommandBuffer::exec_mut function type, but does not perform explicit any/any archetype access.