pub struct Merge<F> { /* private fields */ }
Expand description
A system which merges Ready
futures into the persistent storage.
Please note that your World
has to contain a component storage
for F
and F::Item
.
In case of an error, it will be added to the Errors
resource.
Implementations
Trait Implementations
sourceimpl<'a, T, F> System<'a> for Merge<F>where
T: Component + Send + Sync + 'static,
F: Future<Item = T, Error = BoxedErr> + Component + Send + Sync,
impl<'a, T, F> System<'a> for Merge<F>where
T: Component + Send + Sync + 'static,
F: Future<Item = T, Error = BoxedErr> + Component + Send + Sync,
type SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Read<'a, Errors, DefaultProvider>, Storage<'a, F, FetchMut<'a, MaskedStorage<F>>>, Storage<'a, T, FetchMut<'a, MaskedStorage<T>>>)
type SystemData = (Read<'a, EntitiesRes, DefaultProvider>, Read<'a, Errors, DefaultProvider>, Storage<'a, F, FetchMut<'a, MaskedStorage<F>>>, Storage<'a, T, FetchMut<'a, MaskedStorage<T>>>)
The resource bundle required to execute this system. Read more
sourcefn run(&mut self, (entities, errors, futures, pers): Self::SystemData)
fn run(&mut self, (entities, errors, futures, pers): Self::SystemData)
Executes the system with the required system
data. Read more
sourcefn running_time(&self) -> RunningTime
fn running_time(&self) -> RunningTime
Returns a hint how long the system needs for running.
This is used to optimize the way they’re executed (might
allow more parallelization). Read more
sourcefn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
fn accessor<'b>(&'b self) -> AccessorCow<'a, 'b, Self>
Return the accessor from the
SystemData
.Auto Trait Implementations
impl<F> !RefUnwindSafe for Merge<F>
impl<F> Send for Merge<F>where
F: Send,
impl<F> !Sync for Merge<F>
impl<F> Unpin for Merge<F>where
F: Unpin,
impl<F> !UnwindSafe for Merge<F>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
impl<'a, T> RunWithPool<'a> for Twhere
T: System<'a>,
sourcefn run(&mut self, res: &'a Resources, _: &ThreadPool)
fn run(&mut self, res: &'a Resources, _: &ThreadPool)
Runs the system/group of systems. Possibly in parallel depending
on how the structure is set up. Read more
sourceimpl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
sourcefn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
sourcefn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.