pub struct PostgresQuoteRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl QuoteRepository for PostgresQuoteRepository
impl QuoteRepository for PostgresQuoteRepository
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
quote: &'life1 Quote,
) -> Pin<Box<dyn Future<Output = Result<Quote, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
quote: &'life1 Quote,
) -> Pin<Box<dyn Future<Output = Result<Quote, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create new quote
Source§fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Quote>, String>> + 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<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find quote by ID
Source§fn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all quotes for a building
Source§fn find_by_contractor<'life0, 'async_trait>(
&'life0 self,
contractor_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_contractor<'life0, 'async_trait>(
&'life0 self,
contractor_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all quotes for a contractor
Source§fn find_by_status<'life0, 'life1, 'async_trait>(
&'life0 self,
building_id: Uuid,
status: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_status<'life0, 'life1, 'async_trait>(
&'life0 self,
building_id: Uuid,
status: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find quotes by status
Source§fn find_by_ids<'life0, 'async_trait>(
&'life0 self,
ids: Vec<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_ids<'life0, 'async_trait>(
&'life0 self,
ids: Vec<Uuid>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find multiple quotes by IDs (for comparison)
Source§fn find_by_project_title<'life0, 'life1, 'async_trait>(
&'life0 self,
building_id: Uuid,
project_title: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_project_title<'life0, 'life1, 'async_trait>(
&'life0 self,
building_id: Uuid,
project_title: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find quotes for a specific project (by title)
Source§fn find_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_expired<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Quote>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find expired quotes (for background job)
Source§fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
quote: &'life1 Quote,
) -> Pin<Box<dyn Future<Output = Result<Quote, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
quote: &'life1 Quote,
) -> Pin<Box<dyn Future<Output = Result<Quote, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update quote
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete quote
Auto Trait Implementations§
impl Freeze for PostgresQuoteRepository
impl !RefUnwindSafe for PostgresQuoteRepository
impl Send for PostgresQuoteRepository
impl Sync for PostgresQuoteRepository
impl Unpin for PostgresQuoteRepository
impl !UnwindSafe for PostgresQuoteRepository
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<T> Chain<T> for T
impl<T> Chain<T> for T
§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.