pub trait FundRepository: Send + Sync {
// Required methods
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
fund: &'life1 Fund,
) -> Pin<Box<dyn Future<Output = Result<Fund, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Fund>, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_acp_id<'life0, 'async_trait>(
&'life0 self,
acp_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Fund>, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
fund: &'life1 Fund,
) -> Pin<Box<dyn Future<Output = Result<Fund, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn record_reassignment<'life0, 'life1, 'async_trait>(
&'life0 self,
reassignment: &'life1 FundReassignment,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_reassignments<'life0, 'async_trait>(
&'life0 self,
fund_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<FundReassignment>, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn create<'life0, 'life1, 'async_trait>(
&'life0 self,
fund: &'life1 Fund,
) -> Pin<Box<dyn Future<Output = Result<Fund, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
fund: &'life1 Fund,
) -> Pin<Box<dyn Future<Output = Result<Fund, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist a freshly created fund.
Sourcefn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Fund>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Fund>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Look up a fund by its primary key.
Sourcefn find_by_acp_id<'life0, 'async_trait>(
&'life0 self,
acp_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Fund>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_acp_id<'life0, 'async_trait>(
&'life0 self,
acp_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Fund>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all funds belonging to an ACP (all three natures combined).
Sourcefn update<'life0, 'life1, 'async_trait>(
&'life0 self,
fund: &'life1 Fund,
) -> Pin<Box<dyn Future<Output = Result<Fund, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
fund: &'life1 Fund,
) -> Pin<Box<dyn Future<Output = Result<Fund, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist balance/purpose changes (contribution, reassignment).
Sourcefn record_reassignment<'life0, 'life1, 'async_trait>(
&'life0 self,
reassignment: &'life1 FundReassignment,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_reassignment<'life0, 'life1, 'async_trait>(
&'life0 self,
reassignment: &'life1 FundReassignment,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Append a reassignment to the audit trail. Never mutated afterward
(append-only, like SyndicResponse — cf. AppError::ResponseImmutable
precedent).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".