pub struct StandardApiReasoning { /* private fields */ }Expand description
Validated deterministic JSON/GraphQL and visibility-boundary rule pack.
Generic JSON produces only a response-format hypothesis. GraphQL needs its
official response media type, a route signal, or an explicit paired
comparison. Visibility conclusions require exactly one atomic
termivar_core::ApiVisibilityComparison evidence record.
§Examples
use termivar_scanner::{KnowledgeBase, RuleEngine, StandardApiReasoning};
let knowledge = KnowledgeBase::new();
let mut rules = RuleEngine::new();
let profile = StandardApiReasoning::new()?;
let installed = profile.install(&knowledge, &mut rules)?;
assert_eq!(installed.rules_inserted(), profile.rules().len());Implementations§
Source§impl StandardApiReasoning
impl StandardApiReasoning
Sourcepub fn new() -> Result<Self, StandardApiReasoningError>
pub fn new() -> Result<Self, StandardApiReasoningError>
Builds and validates the complete ontology and rule set.
Sourcepub fn install(
&self,
knowledge: &KnowledgeBase,
engine: &mut RuleEngine,
) -> Result<StandardApiInstallReport, StandardApiReasoningError>
pub fn install( &self, knowledge: &KnowledgeBase, engine: &mut RuleEngine, ) -> Result<StandardApiInstallReport, StandardApiReasoningError>
Installs the complete profile atomically and idempotently.
Rule identities are preflighted on a clone before ontology state is changed. Ontology installation also uses a prospective clone, so a conflict leaves both registries unchanged.
Sourcepub fn concepts(&self) -> &[OntologyConcept]
pub fn concepts(&self) -> &[OntologyConcept]
Returns concepts in stable declaration order.
Sourcepub fn axioms(&self) -> &[OntologyAxiom]
pub fn axioms(&self) -> &[OntologyAxiom]
Returns semantic axioms in stable declaration order.
Sourcepub fn rules(&self) -> &[ReasoningRule]
pub fn rules(&self) -> &[ReasoningRule]
Returns rules in stable declaration order.
Trait Implementations§
Source§impl Clone for StandardApiReasoning
impl Clone for StandardApiReasoning
Source§fn clone(&self) -> StandardApiReasoning
fn clone(&self) -> StandardApiReasoning
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more