pub trait MemoryGraphStore: Send + Sync {
// Required methods
fn upsert_entity<'life0, 'async_trait>(
&'life0 self,
entity: GraphEntityUpsert,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn upsert_edge<'life0, 'async_trait>(
&'life0 self,
edge: GraphEdgeUpsert,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn invalidate_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim_id: i64,
valid_to: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn neighbors<'life0, 'life1, 'async_trait>(
&'life0 self,
start_entity_id: i64,
max_depth: usize,
scope: &'life1 GraphSearchScope,
) -> Pin<Box<dyn Future<Output = Result<Vec<GraphNeighbor>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The memory graph: entities and the relations between them, each edge backed by the claim (fact) that asserts it, so retracting the claim invalidates the edge.
Required Methods§
fn upsert_entity<'life0, 'async_trait>(
&'life0 self,
entity: GraphEntityUpsert,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert_edge<'life0, 'async_trait>(
&'life0 self,
edge: GraphEdgeUpsert,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invalidate_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim_id: i64,
valid_to: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn neighbors<'life0, 'life1, 'async_trait>(
&'life0 self,
start_entity_id: i64,
max_depth: usize,
scope: &'life1 GraphSearchScope,
) -> Pin<Box<dyn Future<Output = Result<Vec<GraphNeighbor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".