Struct hecs_schedule::ScheduleBuilder
source · pub struct ScheduleBuilder { /* private fields */ }
Expand description
Builder for incrementally constructing a schedule.
Implementations§
source§impl 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
pub fn add_system<Args, Ret, S>(&mut self, system: S) -> &mut Self
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§
source§impl Default for ScheduleBuilder
impl Default for ScheduleBuilder
source§fn 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more