pub fn load(&'sys mut self, data: &mut DispatcherData<C, W>) -> EcsResult {
        for mut stage in self.stages.drain(..) {
            for item in stage.drain(..) {
                let mut step = SVec4::new();

                match item {
                    DispatcherItem::System(s) => data.accumulator.push(s),
                    DispatcherItem::FlushCmdBuffers => {
                        data.finalize_executor().map(|systems| step.push(systems));
                        step.push(EcsDispatcherStage::FlushCmdBuffers);
                    }
                    // DispatcherItem::ThreadLocalFn(f) => {
                    //     data.finalize_executor().map(|systems| step.push(systems));
                    //     step.push(EcsDispatcherStage::ThreadLocalFn(f));
                    // }
                    DispatcherItem::ThreadLocalSystem(s) => {
                        data.finalize_executor().map(|systems| step.push(systems));
                        step.push(EcsDispatcherStage::ThreadLocalSystem(s));
                    }
                    // DispatcherItem::SystemBundle(mut bundle) => {
                    //     unsafe {
                    //         let mctx = self.ctx as *mut C;
                    //         let mw = self.world as *mut W;
                    //         let mut builder = EcsDispatcherBuilder::new(&mut *mctx, &mut *mw);
                    //         builder.new_stage();
                    //         bundle.load(&mut *mctx, &mut *mw, &mut builder)?;
                    //         builder.load(data)?;
                    //     }
                    //     data.bundles.push(bundle);
                    // }
                }

                data.stages.push(step);
            }
        }

        Ok(())
    }
/// Evaluates all system bundles (recursively). Resulting systems and unpacked bundles are put
/// into [DispatcherData].
Evaluates all system bundles (recursively). Resulting systems and unpacked bundles are put
into [DispatcherData].
Evaluates all system bundles ( recursively ) . Resulting systems and unpacked bundles are put into [ DispatcherData ] .
pub fn load(&'sys mut self, data: &mut DispatcherData<C, W>) -> EcsResult {
        for mut stage in self.stages.drain(..) {
            for item in stage.drain(..) {
                let mut step = SVec4::new();
                match item {
                    DispatcherItem::System(s) => data.accumulator.push(s),
                    DispatcherItem::FlushCmdBuffers => {
                        data.finalize_executor().map(|systems| step.push(systems));
                        step.push(EcsDispatcherStage::FlushCmdBuffers);
                    }
                    // DispatcherItem::ThreadLocalFn(f) => {
                    //     data.finalize_executor().map(|systems| step.push(systems));
                    //     step.push(EcsDispatcherStage::ThreadLocalFn(f));
                    // }
                    DispatcherItem::ThreadLocalSystem(s) => {
                        data.finalize_executor().map(|systems| step.push(systems));
                        step.push(EcsDispatcherStage::ThreadLocalSystem(s));
                    }
                    // DispatcherItem::SystemBundle(mut bundle) => {
                    //     unsafe {
                    //         let mctx = self.ctx as *mut C;
                    //         let mw = self.world as *mut W;
                    //         let mut builder = EcsDispatcherBuilder::new(&mut *mctx, &mut *mw);
                    //         builder.new_stage();
                    //         bundle.load(&mut *mctx, &mut *mw, &mut builder)?;
                    //         builder.load(data)?;
                    //     }
                    //     data.bundles.push(bundle);
                    // }
                }
                data.stages.push(step);
            }
        }
        Ok(())
    }
pub fn load ( & ' sys mut self , data : & mut DispatcherData < C , W > ) -> EcsResult { for mut stage in self . stages . drain ( .. ) { for item in stage . drain ( .. ) { let mut step = SVec4 :: new ( ) ; match item { DispatcherItem :: System ( s ) => data . accumulator . push ( s ) , DispatcherItem :: FlushCmdBuffers => { data . finalize_executor ( ) . map ( | systems | step . push ( systems ) ) ; step . push ( EcsDispatcherStage :: FlushCmdBuffers ) ; } // DispatcherItem::ThreadLocalFn(f) => { //     data.finalize_executor().map(|systems| step.push(systems)); //     step.push(EcsDispatcherStage::ThreadLocalFn(f)); // } DispatcherItem :: ThreadLocalSystem ( s ) => { data . finalize_executor ( ) . map ( | systems | step . push ( systems ) ) ; step . push ( EcsDispatcherStage :: ThreadLocalSystem ( s ) ) ; } // DispatcherItem::SystemBundle(mut bundle) => { //     unsafe { //         let mctx = self.ctx as *mut C; //         let mw = self.world as *mut W; //         let mut builder = EcsDispatcherBuilder::new(&mut *mctx, &mut *mw); //         builder.new_stage(); //         bundle.load(&mut *mctx, &mut *mw, &mut builder)?; //         builder.load(data)?; //     } //     data.bundles.push(bundle); // } } data . stages . push ( step ) ; } } Ok ( ( ) ) }
Evaluates all system bundles (recursively).
Evaluates all system bundles ( recursively ) .
&'sys mut self
data
&mut DispatcherData<C, W>
&'sys mut self
data
&mut DispatcherData<C, W>