Struct hecs_schedule::ScheduleBuilder
source · [−]pub struct ScheduleBuilder { /* private fields */ }Expand description
Builder for incrementally constructing a schedule.
Implementations
sourceimpl ScheduleBuilder
impl ScheduleBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ScheduleBuilder
sourcepub fn add_system<Args, Ret, S>(&mut self, system: S) -> &mut Self where
S: 'static + System<Args, Ret> + Send,
pub fn add_system<Args, Ret, S>(&mut self, system: S) -> &mut Self where
S: 'static + System<Args, Ret> + Send,
Add a system to the builder
sourcepub fn append(&mut self, other: &mut ScheduleBuilder) -> &mut Self
pub fn append(&mut self, other: &mut ScheduleBuilder) -> &mut Self
Append all system from other into self, leaving other empty.
This allows constructing smaller schedules in different modules and then
joining them together. Work will be paralellized between the two
schedules.
sourcepub fn barrier(&mut self) -> &mut Self
pub fn barrier(&mut self) -> &mut Self
Inserts a barrier that will divide the schedule pararell execution in two dependant halves.
Usually this is not required, as the borrows of the system automatically creates dependencies, but sometimes a manual dependency is needed for things such as interior mutability or channels.
Trait Implementations
sourceimpl Default for ScheduleBuilder
impl Default for ScheduleBuilder
sourcefn default() -> ScheduleBuilder
fn default() -> ScheduleBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ScheduleBuilder
impl Send for ScheduleBuilder
impl !Sync for ScheduleBuilder
impl Unpin for ScheduleBuilder
impl !UnwindSafe for ScheduleBuilder
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