pub struct CompositionManager { /* private fields */ }Expand description
Composition manager for modules, templates, and inheritance
Implementations§
Source§impl CompositionManager
impl CompositionManager
Sourcepub fn register_module(&mut self, module: RuleModule) -> Result<()>
pub fn register_module(&mut self, module: RuleModule) -> Result<()>
Register a module
Sourcepub fn get_module(&self, name: &str) -> Option<&RuleModule>
pub fn get_module(&self, name: &str) -> Option<&RuleModule>
Get a module by name
Sourcepub fn get_all_modules(&self) -> Vec<&RuleModule>
pub fn get_all_modules(&self) -> Vec<&RuleModule>
Get all modules
Sourcepub fn remove_module(&mut self, name: &str) -> Option<RuleModule>
pub fn remove_module(&mut self, name: &str) -> Option<RuleModule>
Remove a module
Sourcepub fn register_template(&mut self, template: RuleTemplate) -> Result<()>
pub fn register_template(&mut self, template: RuleTemplate) -> Result<()>
Register a template
Sourcepub fn get_template(&self, name: &str) -> Option<&RuleTemplate>
pub fn get_template(&self, name: &str) -> Option<&RuleTemplate>
Get a template by name
Sourcepub fn instantiate_template(
&self,
template_name: &str,
rule_name: String,
args: &HashMap<String, Term>,
) -> Result<Rule>
pub fn instantiate_template( &self, template_name: &str, rule_name: String, args: &HashMap<String, Term>, ) -> Result<Rule>
Instantiate a template
Sourcepub fn register_inheritance(&mut self, inheritance: RuleInheritance)
pub fn register_inheritance(&mut self, inheritance: RuleInheritance)
Register an inheritance relationship
Sourcepub fn get_all_rules(&self) -> Vec<Rule>
pub fn get_all_rules(&self) -> Vec<Rule>
Get all rules from all modules
Sourcepub fn get_module_rules(&self, module_name: &str) -> Option<Vec<Rule>>
pub fn get_module_rules(&self, module_name: &str) -> Option<Vec<Rule>>
Get rules from a specific module
Sourcepub fn apply_inheritances(&self) -> Result<Vec<Rule>>
pub fn apply_inheritances(&self) -> Result<Vec<Rule>>
Apply all inheritance relationships
Sourcepub fn check_dependency_cycles(&self) -> Result<()>
pub fn check_dependency_cycles(&self) -> Result<()>
Check for dependency cycles
Sourcepub fn get_load_order(&self) -> Result<Vec<String>>
pub fn get_load_order(&self) -> Result<Vec<String>>
Get module load order (topological sort of dependencies)
Sourcepub fn get_stats(&self) -> CompositionStats
pub fn get_stats(&self) -> CompositionStats
Get composition statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompositionManager
impl RefUnwindSafe for CompositionManager
impl Send for CompositionManager
impl Sync for CompositionManager
impl Unpin for CompositionManager
impl UnsafeUnpin for CompositionManager
impl UnwindSafe for CompositionManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more