ConvocationRecipientRepository

Trait ConvocationRecipientRepository 

Source
pub trait ConvocationRecipientRepository: Send + Sync {
Show 15 methods // Required methods fn create<'life0, 'life1, 'async_trait>( &'life0 self, recipient: &'life1 ConvocationRecipient, ) -> Pin<Box<dyn Future<Output = Result<ConvocationRecipient, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_many<'life0, 'life1, 'async_trait>( &'life0 self, recipients: &'life1 [ConvocationRecipient], ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn find_by_id<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn find_by_convocation<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn find_by_convocation_and_owner<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, owner_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn find_by_owner<'life0, 'async_trait>( &'life0 self, owner_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn find_by_attendance_status<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, status: AttendanceStatus, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn find_needing_reminder<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn find_failed_emails<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update<'life0, 'life1, 'async_trait>( &'life0 self, recipient: &'life1 ConvocationRecipient, ) -> Pin<Box<dyn Future<Output = Result<ConvocationRecipient, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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; fn count_by_convocation<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn count_opened<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn count_by_attendance_status<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, status: AttendanceStatus, ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_tracking_summary<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<RecipientTrackingSummary, String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

Required Methods§

Source

fn create<'life0, 'life1, 'async_trait>( &'life0 self, recipient: &'life1 ConvocationRecipient, ) -> Pin<Box<dyn Future<Output = Result<ConvocationRecipient, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new convocation recipient

Source

fn create_many<'life0, 'life1, 'async_trait>( &'life0 self, recipients: &'life1 [ConvocationRecipient], ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create multiple recipients at once (bulk insert)

Source

fn find_by_id<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find recipient by ID

Source

fn find_by_convocation<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find all recipients for a convocation

Source

fn find_by_convocation_and_owner<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, owner_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find recipient by convocation and owner

Source

fn find_by_owner<'life0, 'async_trait>( &'life0 self, owner_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find recipients by owner (all convocations sent to this owner)

Source

fn find_by_attendance_status<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, status: AttendanceStatus, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find recipients by attendance status

Source

fn find_needing_reminder<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find recipients who need reminder (email sent but not opened, reminder not sent yet)

Source

fn find_failed_emails<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConvocationRecipient>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find recipients with failed emails

Source

fn update<'life0, 'life1, 'async_trait>( &'life0 self, recipient: &'life1 ConvocationRecipient, ) -> Pin<Box<dyn Future<Output = Result<ConvocationRecipient, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update recipient

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,

Delete recipient

Source

fn count_by_convocation<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Count recipients by convocation

Source

fn count_opened<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Count recipients who opened email

Source

fn count_by_attendance_status<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, status: AttendanceStatus, ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Count recipients by attendance status

Source

fn get_tracking_summary<'life0, 'async_trait>( &'life0 self, convocation_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<RecipientTrackingSummary, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get tracking summary for a convocation (opened count, attendance counts)

Implementors§