Struct flatbox_ecs::ScheduleBuilder
source · pub struct ScheduleBuilder { /* private fields */ }
Expand description
Builder for incrementally constructing a schedule.
Implementations§
source§impl ScheduleBuilder
impl ScheduleBuilder
sourcepub fn new() -> ScheduleBuilder
pub fn new() -> ScheduleBuilder
Creates a new ScheduleBuilder
sourcepub fn add_system<Args, Ret, S>(&mut self, system: S) -> &mut ScheduleBuilder
pub fn add_system<Args, Ret, S>(&mut self, system: S) -> &mut ScheduleBuilder
Add a system to the builder
sourcepub fn append(&mut self, other: &mut ScheduleBuilder) -> &mut ScheduleBuilder
pub fn append(&mut self, other: &mut ScheduleBuilder) -> &mut ScheduleBuilder
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 ScheduleBuilder
pub fn barrier(&mut self) -> &mut ScheduleBuilder
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.
sourcepub fn flush(&mut self) -> &mut ScheduleBuilder
pub fn flush(&mut self) -> &mut ScheduleBuilder
Flush the commandbuffer and apply the commands to the world
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 Freeze for ScheduleBuilder
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
source§impl<T> Downcast for T
impl<T> Downcast for T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§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 moresource§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).source§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.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.