Trait brane_tsk::spec::Planner

source ·
pub trait Planner {
    // Required method
    fn plan<'life0, 'async_trait>(
        &'life0 self,
        workflow: Workflow,
    ) -> Pin<Box<dyn Future<Output = Result<Workflow, PlanError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Defines a common interface for planners. This is mostly for software engineering reasons, and not really due to the need to have them interchangeable.

Required Methods§

source

fn plan<'life0, 'async_trait>( &'life0 self, workflow: Workflow, ) -> Pin<Box<dyn Future<Output = Result<Workflow, PlanError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Plans the given workflow by:

  • resolving every at at every Node to have a location that makes sense for this instance; and
  • populating the matching RuntimeDataIndex, that hosts information on accessing both datasets and intermediate results.
§Arguments
  • workflow: The workflow to plan.
§Returns

A tuple of same workflow, but now with planned nodes, and the new RuntimeDataIndex.

Implementors§