Skip to main content

relay_knowledge/storage/contracts/
framework.rs

1//! Storage boundary for framework-aware component and template graphs.
2
3use crate::domain::{FrameworkGraph, FrameworkGraphRequest};
4
5use super::{StorageError, StorageFuture};
6
7/// Read-only framework graph capabilities shared by repository stores.
8pub trait FrameworkGraphStore: Send + Sync {
9    fn search_framework_graph(
10        &self,
11        request: FrameworkGraphRequest,
12    ) -> StorageFuture<'_, FrameworkGraph> {
13        Box::pin(async move {
14            Err(StorageError::InvalidInput(format!(
15                "framework graph search for repository '{}' is unavailable",
16                request.repository.repository
17            )))
18        })
19    }
20
21    fn search_framework_graph_scope(
22        &self,
23        source_scope: String,
24        _request: FrameworkGraphRequest,
25    ) -> StorageFuture<'_, FrameworkGraph> {
26        Box::pin(async move {
27            Err(StorageError::InvalidInput(format!(
28                "framework graph search for source scope '{source_scope}' is unavailable"
29            )))
30        })
31    }
32}