Skip to main content

CanQueryMemory

Trait CanQueryMemory 

Source
pub trait CanQueryMemory: Send + Sync {
    // Required method
    fn query_ergo<'life0, 'async_trait>(
        &'life0 self,
        req: QueryMemoryRequest,
    ) -> Pin<Box<dyn Future<Output = Result<QueryMemoryResponse, MemError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Object-safe async query seam. Implemented for EngineHandle<P,O,V> via blanket impl.

Not intended for direct use — call recall() instead. You may implement this for mock engines in tests.

Required Methods§

Source

fn query_ergo<'life0, 'async_trait>( &'life0 self, req: QueryMemoryRequest, ) -> Pin<Box<dyn Future<Output = Result<QueryMemoryResponse, MemError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query the engine for the current belief on a subject+predicate.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<P, O, V> CanQueryMemory for EngineHandle<P, O, V>
where P: PersistencePort + Send + Sync + 'static, O: OraclePort + Send + Sync + 'static, V: VectorPort + Send + Sync + 'static,