Skip to main content

RuntimeExtensionRegistry

Trait RuntimeExtensionRegistry 

Source
pub trait RuntimeExtensionRegistry<S, V, DM, IDM>{
    type Phase: CustomSearchPhase<S>;

    // Required methods
    fn policy(&self) -> RuntimeExtensionPolicy;
    fn contains_custom(&self, name: &str) -> bool;
    fn instantiate_custom(
        &self,
        name: &str,
        context: &SearchContext<S, V, DM, IDM>,
    ) -> Option<Self::Phase>;
    fn contains_partitioned(&self, name: &str) -> bool;
    fn instantiate_partitioned(
        &self,
        name: &str,
        config: &PartitionedSearchConfig,
        context: &SearchContext<S, V, DM, IDM>,
    ) -> Option<Self::Phase>;
}
Expand description

Recursive, concrete extension registry owned by a compiled runtime graph.

Compilation consults only the registration predicates. Instantiation is deferred to the graph executor, which creates fresh concrete phases from its frozen SearchContext once for each solve.

Required Associated Types§

Required Methods§

Source

fn policy(&self) -> RuntimeExtensionPolicy

Source

fn contains_custom(&self, name: &str) -> bool

Source

fn instantiate_custom( &self, name: &str, context: &SearchContext<S, V, DM, IDM>, ) -> Option<Self::Phase>

Source

fn contains_partitioned(&self, name: &str) -> bool

Source

fn instantiate_partitioned( &self, name: &str, config: &PartitionedSearchConfig, context: &SearchContext<S, V, DM, IDM>, ) -> Option<Self::Phase>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<S, V, DM, IDM, Previous, Builder, CurrentPhase> RuntimeExtensionRegistry<S, V, DM, IDM> for CustomPhaseNode<Previous, Builder, CurrentPhase>
where S: PlanningSolution, Previous: RuntimeExtensionRegistry<S, V, DM, IDM>, Builder: Fn(&SearchContext<S, V, DM, IDM>) -> CurrentPhase, CurrentPhase: CustomSearchPhase<S>,

Source§

type Phase = CustomPhaseUnion<<Previous as RuntimeExtensionRegistry<S, V, DM, IDM>>::Phase, CurrentPhase>

Source§

impl<S, V, DM, IDM, Previous, Builder, CurrentPhase> RuntimeExtensionRegistry<S, V, DM, IDM> for PartitionedPhaseNode<Previous, Builder, CurrentPhase>
where S: PlanningSolution, Previous: RuntimeExtensionRegistry<S, V, DM, IDM>, Builder: Fn(&SearchContext<S, V, DM, IDM>, &PartitionedSearchConfig) -> CurrentPhase, CurrentPhase: CustomSearchPhase<S>,

Source§

type Phase = CustomPhaseUnion<<Previous as RuntimeExtensionRegistry<S, V, DM, IDM>>::Phase, CurrentPhase>

Source§

impl<S, V, DM, IDM> RuntimeExtensionRegistry<S, V, DM, IDM> for NoDynamicExtensions

Source§

impl<S, V, DM, IDM> RuntimeExtensionRegistry<S, V, DM, IDM> for NoTypedExtensions