pub struct PostgresFundRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl FundRepository for PostgresFundRepository
impl FundRepository for PostgresFundRepository
Source§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 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.
Source§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_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.
Source§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 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).
Source§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 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).
Source§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 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).Auto Trait Implementations§
impl !RefUnwindSafe for PostgresFundRepository
impl !UnwindSafe for PostgresFundRepository
impl Freeze for PostgresFundRepository
impl Send for PostgresFundRepository
impl Sync for PostgresFundRepository
impl Unpin for PostgresFundRepository
impl UnsafeUnpin for PostgresFundRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.