pub struct WorkloadSystem { /* private fields */ }
Expand description

Self contained system that may be inserted into a Workload.

Example:

use shipyard::{Component, IntoWorkloadSystem, View, Workload, WorkloadSystem, World};

#[derive(Component)]
struct U32(u32);

#[derive(Component)]
struct USIZE(usize);

fn sys1(u32s: View<U32>) {}
fn sys2(usizes: View<USIZE>) {}

let workload_sys1: WorkloadSystem = sys1.into_workload_system().unwrap();

let mut workload = Workload::new("my_workload")
    .with_system(workload_sys1)
    .with_system(sys2);

Trait Implementations

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Wraps a function in a struct containing all information required by a workload.

Only run the system if the function evaluates to true.

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

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

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

System name used in error and gui built for shipyard.
Defaults to the system function name. Read more

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

When building a workload, this system will assert that at least one of the other system is present in the workload. Read more

When building a workload, this system will assert that at least one of the other system is present before itself in the workload. Read more

When building a workload, this system will assert that at least one of the other system is present after itself in the workload. Read more

Only run the system if the T storage is empty. Read more

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

Only run the system if the storage is empty. Read more

Do not run the system if the T storage is empty. Read more

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

Do not run the system if the storage is empty. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more