pub struct DistributedReasoner { /* private fields */ }Expand description
Distributed reasoning engine with caching support
Implementations§
Source§impl DistributedReasoner
impl DistributedReasoner
Sourcepub fn with_cache(cache: Arc<CacheManager>) -> Result<Self>
pub fn with_cache(cache: Arc<CacheManager>) -> Result<Self>
Create with a cache manager
Sourcepub async fn query(
&self,
goal: &Predicate,
kb: &KnowledgeBase,
) -> Result<Vec<Substitution>>
pub async fn query( &self, goal: &Predicate, kb: &KnowledgeBase, ) -> Result<Vec<Substitution>>
Query locally with optional caching
Sourcepub async fn prove(
&self,
goal: &Predicate,
kb: &KnowledgeBase,
) -> Result<Option<Proof>>
pub async fn prove( &self, goal: &Predicate, kb: &KnowledgeBase, ) -> Result<Option<Proof>>
Prove a goal with goal decomposition tracking
Sourcepub async fn prove_with_decomposition(
&mut self,
goal: &Predicate,
kb: &KnowledgeBase,
) -> Result<(Option<Proof>, Vec<GoalDecomposition>)>
pub async fn prove_with_decomposition( &mut self, goal: &Predicate, kb: &KnowledgeBase, ) -> Result<(Option<Proof>, Vec<GoalDecomposition>)>
Prove with goal decomposition tracking
Sourcepub fn get_unsolved_goals(&self) -> Vec<&Predicate>
pub fn get_unsolved_goals(&self) -> Vec<&Predicate>
Get unsolved goals that could be forwarded to peers
Sourcepub fn cache_stats(&self) -> Option<CombinedCacheStats>
pub fn cache_stats(&self) -> Option<CombinedCacheStats>
Get cache statistics (if cache is available)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DistributedReasoner
impl !RefUnwindSafe for DistributedReasoner
impl Send for DistributedReasoner
impl Sync for DistributedReasoner
impl Unpin for DistributedReasoner
impl !UnwindSafe for DistributedReasoner
Blanket Implementations§
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
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