/// Call a task function within the context
Call a task function within the context
Call a task function within the context
pub(crate) fn call_with_context<'f>(&mut self, f: &'f TaskFn) -> TaskResult<()> {
        env::set_current_dir(&self.work_dir).expect("error on chdir to task work dir");
        let mut outputs = Vec::new();
        let mut inputs = Vec::new();
        // Inputs and outputs are swapped out from the Context to hand over to the task.
        mem::swap(&mut outputs, &mut self.outputs);
        mem::swap(&mut inputs, &mut self.inputs);
        debug!("Calling {:?} in {:?}", self.spec.method, self.work_dir);
        let res = f(self, &inputs, &mut outputs);
        mem::swap(&mut outputs, &mut self.outputs);
        mem::swap(&mut inputs, &mut self.inputs);
        res
    }
pub ( crate ) fn call_with_context < ' f > ( & mut self , f : & ' f TaskFn ) -> TaskResult < ( ) > { env :: set_current_dir ( & self . work_dir ) . expect ( " " ) ; let mut outputs = Vec :: new ( ) ; let mut inputs = Vec :: new ( ) ; // Inputs and outputs are swapped out from the Context to hand over to the task. mem :: swap ( & mut outputs , & mut self . outputs ) ; mem :: swap ( & mut inputs , & mut self . inputs ) ; debug ! ( " " self spec method self work_dir ) ; let res = f ( self , & inputs , & mut outputs ) ; mem :: swap ( & mut outputs , & mut self . outputs ) ; mem :: swap ( & mut inputs , & mut self . inputs ) ; res }
Call a task function within the context
Call a task function within the context
&mut self
f
&'f TaskFn