pub trait WorkloadModificator {
    fn run_if<RunB, Run: IntoWorkloadRunIf<RunB>>(self, run_if: Run) -> Workload;
    fn skip_if<RunB, Run: IntoWorkloadRunIf<RunB>>(self, run_if: Run) -> Workload;
    fn before_all<T>(self, other: impl AsLabel<T>) -> Workload;
    fn after_all<T>(self, other: impl AsLabel<T>) -> Workload;
    fn rename<T>(self, name: impl AsLabel<T>) -> Workload;
    fn tag<T>(self, tag: impl AsLabel<T>) -> Workload;

    fn run_if_storage_empty<T: Component>(self) -> Workload
    where
        Self: Sized
, { ... } fn run_if_missing_unique<T: Unique>(self) -> Workload
    where
        Self: Sized
, { ... } fn run_if_storage_empty_by_id(self, storage_id: StorageId) -> Workload
    where
        Self: Sized
, { ... } fn skip_if_storage_empty<T: Component>(self) -> Workload
    where
        Self: Sized
, { ... } fn skip_if_missing_unique<T: Unique>(self) -> Workload
    where
        Self: Sized
, { ... } fn skip_if_storage_empty_by_id(self, storage_id: StorageId) -> Workload
    where
        Self: Sized
, { ... } }
Expand description

Modifies a workload.

Required Methods

Only run the workload if the function evaluates to true.

Do not run the workload if the function evaluates to true.

When building a workload, all systems within this workload will be placed before all invocation of the other system or workload.

When building a workload, all systems within this workload will be placed after all invocation of the other system or workload.

Changes the name of this workload.

Adds a tag to this workload. Tags can be used to control system ordering when running workloads.

Provided Methods

Only run the workload if the T storage is empty.

If the storage is not present it is considered empty. If the storage is already borrowed, assume it’s not empty.

Only run the workload if the T unique storage is not present in the World.

Only run the workload if the storage is empty.

If the storage is not present it is considered empty. If the storage is already borrowed, assume it’s not empty.

Do not run the workload if the T storage is empty.

If the storage is not present it is considered empty. If the storage is already borrowed, assume it’s not empty.

Do not run the workload if the T unique storage is not present in the World.

Do not run the workload if the storage is empty.

If the storage is not present it is considered empty. If the storage is already borrowed, assume it’s not empty.

Implementors