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§
Sourcefn descriptor(&self) -> &'static PlannerDescriptor
fn descriptor(&self) -> &'static PlannerDescriptor
This planner’s static description.
Sourcefn compile(
&self,
config: &PlannerConfig,
context: &CompileContext<'_>,
) -> Result<Box<dyn CompiledPlanner>, DiagnosticBag>
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".