pub struct PostgresTechnicalSpecRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl TechnicalSpecRepository for PostgresTechnicalSpecRepository
impl TechnicalSpecRepository for PostgresTechnicalSpecRepository
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 TechnicalSpec,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 TechnicalSpec,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist a freshly minted spec (Draft).
Source§fn update_status<'life0, 'life1, 'async_trait>(
&'life0 self,
spec_id: Uuid,
status: &'life1 str,
updated_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_status<'life0, 'life1, 'async_trait>(
&'life0 self,
spec_id: Uuid,
status: &'life1 str,
updated_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update a spec’s mutable workflow attributes (status / updated_at).
Used by the workflow transitions (
submit, mark_approved).
The repository implementation MUST NOT allow title / description /
version edits — those happen exclusively via bump_version which
goes through save on a brand-new row.fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<TechnicalSpec>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_for_acp<'life0, 'async_trait>(
&'life0 self,
acp_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<TechnicalSpec>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_for_acp<'life0, 'async_trait>(
&'life0 self,
acp_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<TechnicalSpec>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all specs for an ACP, newest first.
Source§fn save_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
sig: &'life1 TechnicalSpecSignature,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_signature<'life0, 'life1, 'async_trait>(
&'life0 self,
sig: &'life1 TechnicalSpecSignature,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist an append-only signature. The DB UNIQUE constraint on
(spec_id, signatory_user_id, role) means a duplicate insert will
surface as
AppError::SignatureAlreadyExists (the impl translates
the SQL conflict).fn list_signatures_for_spec<'life0, 'async_trait>(
&'life0 self,
spec_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<TechnicalSpecSignature>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresTechnicalSpecRepository
impl !UnwindSafe for PostgresTechnicalSpecRepository
impl Freeze for PostgresTechnicalSpecRepository
impl Send for PostgresTechnicalSpecRepository
impl Sync for PostgresTechnicalSpecRepository
impl Unpin for PostgresTechnicalSpecRepository
impl UnsafeUnpin for PostgresTechnicalSpecRepository
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.