pub struct PostgresNoticeRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl NoticeRepository for PostgresNoticeRepository
impl NoticeRepository for PostgresNoticeRepository
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new notice
Source§fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Notice>, 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<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notice by ID
Source§fn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, 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<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all notices for a building
Source§fn find_published_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_published_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all published notices for a building (visible to members)
Source§fn find_pinned_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_pinned_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all pinned notices for a building (important announcements)
Source§fn find_by_type<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
notice_type: NoticeType,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_type<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
notice_type: NoticeType,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notices by type (Announcement, Event, LostAndFound, ClassifiedAd)
Source§fn find_by_category<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
category: NoticeCategory,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_category<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
category: NoticeCategory,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notices by category (General, Maintenance, Social, Security, etc.)
Source§fn find_by_status<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
status: NoticeStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_status<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
status: NoticeStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notices by status (Draft, Published, Archived, Expired)
Find all notices created by an author (Owner)
Source§fn find_expired<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_expired<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all expired notices for a building (for auto-archiving)
Source§fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update an existing notice
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), 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<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a notice
Source§fn count_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Count total notices for a building
Auto Trait Implementations§
impl Freeze for PostgresNoticeRepository
impl !RefUnwindSafe for PostgresNoticeRepository
impl Send for PostgresNoticeRepository
impl Sync for PostgresNoticeRepository
impl Unpin for PostgresNoticeRepository
impl !UnwindSafe for PostgresNoticeRepository
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.