1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use std::marker::PhantomData;
use async_trait::async_trait;
use cqrs_es::{Aggregate, View};
use persist_es::{PersistenceError, QueryContext, ViewRepository};
pub struct DynamoViewRepository<V, A> {
_phantom: PhantomData<(V, A)>,
}
#[async_trait]
impl<V, A> ViewRepository<V, A> for DynamoViewRepository<V, A>
where
V: View<A>,
A: Aggregate,
{
async fn load(
&self,
_query_instance_id: &str,
) -> Result<Option<(V, QueryContext)>, PersistenceError> {
todo!()
}
async fn update_view(&self, _view: V, _context: QueryContext) -> Result<(), PersistenceError> {
todo!()
}
}