pub struct InMemoryFacts { /* private fields */ }Implementations§
Source§impl InMemoryFacts
impl InMemoryFacts
Sourcepub fn seed(&self, fact: Fact)
pub fn seed(&self, fact: Fact)
Insert a fact bypassing save (no async, no Result) — used to seed
fixtures before the use case runs.
Sourcepub fn get_clone(&self, id: &FactId) -> Option<Fact>
pub fn get_clone(&self, id: &FactId) -> Option<Fact>
Read-only snapshot of a stored fact by id.
Sourcepub fn script_dedup_hits(&self, hits: Vec<SearchHit>)
pub fn script_dedup_hits(&self, hits: Vec<SearchHit>)
Program the response returned by search_for_dedup.
Sourcepub fn script_search_hits(&self, hits: Vec<SearchHit>)
pub fn script_search_hits(&self, hits: Vec<SearchHit>)
Program the response returned by search_similar. Used by
EnrichRequest::execute unit tests to push vector-search survivors
into the rerank stage.
pub fn is_empty(&self) -> bool
pub fn contains(&self, id: &FactId) -> bool
Trait Implementations§
Source§impl Clone for InMemoryFacts
impl Clone for InMemoryFacts
Source§fn clone(&self) -> InMemoryFacts
fn clone(&self) -> InMemoryFacts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for InMemoryFacts
impl Default for InMemoryFacts
Source§fn default() -> InMemoryFacts
fn default() -> InMemoryFacts
Returns the “default value” for a type. Read more
Source§impl FactRepository for InMemoryFacts
impl FactRepository for InMemoryFacts
Source§async fn save(&self, fact: &Fact) -> Result<(), RepoError>
async fn save(&self, fact: &Fact) -> Result<(), RepoError>
Insert or replace a fact (idempotent by
FactId).Source§async fn get(
&self,
id: &FactId,
_memory_key: &MemoryKey,
) -> Result<Option<Fact>, RepoError>
async fn get( &self, id: &FactId, _memory_key: &MemoryKey, ) -> Result<Option<Fact>, RepoError>
Look up a fact by id within a memory namespace. Read more
Source§async fn list_accepted(
&self,
_memory_key: &MemoryKey,
) -> Result<Vec<Fact>, RepoError>
async fn list_accepted( &self, _memory_key: &MemoryKey, ) -> Result<Vec<Fact>, RepoError>
All currently-accepted facts in a namespace (§3 retrieval pool).
Source§async fn list_pending(
&self,
_memory_key: &MemoryKey,
) -> Result<Vec<Fact>, RepoError>
async fn list_pending( &self, _memory_key: &MemoryKey, ) -> Result<Vec<Fact>, RepoError>
All currently-pending facts in a namespace (§5 session-end input).
Source§async fn list_memory_keys_for_session(
&self,
session_id: &SessionId,
) -> Result<Vec<MemoryKey>, RepoError>
async fn list_memory_keys_for_session( &self, session_id: &SessionId, ) -> Result<Vec<MemoryKey>, RepoError>
Source§async fn list_memory_keys(&self) -> Result<Vec<MemoryKey>, RepoError>
async fn list_memory_keys(&self) -> Result<Vec<MemoryKey>, RepoError>
Distinct
memory_key values across every namespace in the store. Read moreSource§async fn search_similar(
&self,
_embedding: Vec<f32>,
_memory_key: &MemoryKey,
_limit: usize,
) -> Result<Vec<SearchHit>, RepoError>
async fn search_similar( &self, _embedding: Vec<f32>, _memory_key: &MemoryKey, _limit: usize, ) -> Result<Vec<SearchHit>, RepoError>
K-nearest-neighbour vector search against accepted facts. Read more
Source§async fn search_for_dedup(
&self,
_embedding: Vec<f32>,
_memory_key: &MemoryKey,
_limit: usize,
) -> Result<Vec<SearchHit>, RepoError>
async fn search_for_dedup( &self, _embedding: Vec<f32>, _memory_key: &MemoryKey, _limit: usize, ) -> Result<Vec<SearchHit>, RepoError>
Semantic-dedup search across pending AND accepted facts (no
tombstones). Used by the extraction pipeline’s safety-net Layer 2
(
persist_facts step 2): a rephrased re-observation hashes to a
different FactId, so the exact match misses — but the embedding is
still near-identical and a cross-session confirmation can promote the
existing fact past the accept threshold. Read moreAuto Trait Implementations§
impl Freeze for InMemoryFacts
impl RefUnwindSafe for InMemoryFacts
impl Send for InMemoryFacts
impl Sync for InMemoryFacts
impl Unpin for InMemoryFacts
impl UnsafeUnpin for InMemoryFacts
impl UnwindSafe for InMemoryFacts
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