Struct scoundrel::WorkloadSystem
source · [−]pub struct WorkloadSystem { /* private fields */ }
Expand description
Self contained system that may be inserted into a WorkloadBuilder
.
Example:
use shipyard::{IntoWorkloadSystem, View, Workload, WorkloadSystem, World};
fn sys1(u32s: View<u32>) {}
fn sys2(usizes: View<usize>) {}
let workload_sys1: WorkloadSystem = sys1.into_workload_system().unwrap();
let mut workload = Workload::builder("my_workload");
workload.with_system(workload_sys1);
workload.with_system(&sys2);
Trait Implementations
sourceimpl Extend<WorkloadSystem> for WorkloadBuilder
impl Extend<WorkloadSystem> for WorkloadBuilder
sourcefn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = WorkloadSystem>,
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = WorkloadSystem>,
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl IntoWorkloadSystem<(), ()> for WorkloadSystem
impl IntoWorkloadSystem<(), ()> for WorkloadSystem
sourcefn into_workload_system(self) -> Result<WorkloadSystem, InvalidSystem>
fn into_workload_system(self) -> Result<WorkloadSystem, InvalidSystem>
Wraps a function in a struct containing all information required by a workload.
sourcefn into_workload_try_system<Ok, Err>(
self
) -> Result<WorkloadSystem, InvalidSystem>
fn into_workload_try_system<Ok, Err>(
self
) -> Result<WorkloadSystem, InvalidSystem>
Wraps a failible function in a struct containing all information required by a workload.
The workload will stop if an error is returned. Read more
Auto Trait Implementations
impl !RefUnwindSafe for WorkloadSystem
impl Send for WorkloadSystem
impl Sync for WorkloadSystem
impl Unpin for WorkloadSystem
impl !UnwindSafe for WorkloadSystem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.