pub struct PostgresSyndicResponseRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl SyndicResponseRepository for PostgresSyndicResponseRepository
impl SyndicResponseRepository for PostgresSyndicResponseRepository
Source§fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
response: &'life1 SyndicResponse,
) -> 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,
response: &'life1 SyndicResponse,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Persist a freshly minted response. Implementation MUST NOT attempt
UPDATE ... ON CONFLICT — the table is append-only and the DB
trigger guards against any subsequent mutation (INV-23).Source§fn list_for_ticket<'life0, 'async_trait>(
&'life0 self,
ticket_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<SyndicResponse>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_for_ticket<'life0, 'async_trait>(
&'life0 self,
ticket_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<SyndicResponse>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List every response attached to a ticket, oldest first (audit order).
Source§fn find_overdue_tickets<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_overdue_tickets<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid>, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the ids of tickets whose SLA deadline (
sla_due_at) is past
now AND that have not been escalated yet
(sla_escalated_at IS NULL). Cron entry point.Source§fn mark_ticket_escalated<'life0, 'async_trait>(
&'life0 self,
ticket_id: Uuid,
escalated_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_ticket_escalated<'life0, 'async_trait>(
&'life0 self,
ticket_id: Uuid,
escalated_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Mark a ticket as SLA-escalated. Idempotent: if the column already
carries a timestamp, the implementation SHOULD leave it untouched
(audit fidelity — first event wins).
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresSyndicResponseRepository
impl !UnwindSafe for PostgresSyndicResponseRepository
impl Freeze for PostgresSyndicResponseRepository
impl Send for PostgresSyndicResponseRepository
impl Sync for PostgresSyndicResponseRepository
impl Unpin for PostgresSyndicResponseRepository
impl UnsafeUnpin for PostgresSyndicResponseRepository
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.