Skip to main content

PlannerFactory

Trait PlannerFactory 

Source
pub trait PlannerFactory: Send + Sync {
    // Required methods
    fn descriptor(&self) -> &'static PlannerDescriptor;
    fn compile(
        &self,
        config: &PlannerConfig,
        context: &CompileContext<'_>,
    ) -> Result<Box<dyn CompiledPlanner>, DiagnosticBag>;
}
Expand description

Compiles a PlannerConfig into a runnable planner.

Required Methods§

Source

fn descriptor(&self) -> &'static PlannerDescriptor

This planner’s static description.

Source

fn compile( &self, config: &PlannerConfig, context: &CompileContext<'_>, ) -> Result<Box<dyn CompiledPlanner>, DiagnosticBag>

Validate config and build a runtime planner, or return a DiagnosticBag describing every problem found.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§