Skip to main content

kmp_application/queries/
list_memory_abouts.rs

1use kmp_domain::{MemoryAboutIndexReader, SnapshotStore};
2
3use crate::ApplicationError;
4use crate::queries::QueryApplicationService;
5
6impl<G, D, S> QueryApplicationService<G, D, S>
7where
8    G: MemoryAboutIndexReader + Send + Sync,
9    S: SnapshotStore + Send + Sync,
10{
11    pub async fn list_memory_abouts(&self) -> Result<Vec<String>, ApplicationError> {
12        Ok(self.graph_reader.list_memory_abouts().await?)
13    }
14
15    pub async fn list_memory_abouts_by_dimensions(
16        &self,
17        dimension_ids: &[String],
18    ) -> Result<Vec<String>, ApplicationError> {
19        Ok(self
20            .graph_reader
21            .list_memory_abouts_by_dimensions(dimension_ids)
22            .await?)
23    }
24}