Skip to main content

MailSyncProvider

Trait MailSyncProvider 

Source
pub trait MailSyncProvider: Send + Sync {
Show 16 methods // Required methods fn name(&self) -> &str; fn account_id(&self) -> &AccountId; fn capabilities(&self) -> SyncCapabilities; fn authenticate<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn refresh_auth<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_labels<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Label>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_messages<'life0, 'life1, 'async_trait>( &'life0 self, cursor: &'life1 SyncCursor, ) -> Pin<Box<dyn Future<Output = Result<SyncBatch>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn fetch_attachment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, provider_attachment_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn modify_labels<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, add: &'life2 [String], remove: &'life3 [String], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn trash<'life0, 'life1, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_read<'life0, 'life1, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, read: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn set_starred<'life0, 'life1, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, starred: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn create_label<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _name: &'life1 str, _color: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<Label>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn rename_label<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _provider_label_id: &'life1 str, _new_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Label>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn delete_label<'life0, 'life1, 'async_trait>( &'life0 self, _provider_label_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn search_remote<'life0, 'life1, 'async_trait>( &'life0 self, _query: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}

Required Methods§

Source

fn name(&self) -> &str

Source

fn account_id(&self) -> &AccountId

Source

fn capabilities(&self) -> SyncCapabilities

Source

fn authenticate<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn refresh_auth<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn sync_labels<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Label>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn sync_messages<'life0, 'life1, 'async_trait>( &'life0 self, cursor: &'life1 SyncCursor, ) -> Pin<Box<dyn Future<Output = Result<SyncBatch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fetch_attachment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, provider_attachment_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn modify_labels<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, add: &'life2 [String], remove: &'life3 [String], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn trash<'life0, 'life1, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn set_read<'life0, 'life1, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, read: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn set_starred<'life0, 'life1, 'async_trait>( &'life0 self, provider_message_id: &'life1 str, starred: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn create_label<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _name: &'life1 str, _color: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<Label>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn rename_label<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _provider_label_id: &'life1 str, _new_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Label>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn delete_label<'life0, 'life1, 'async_trait>( &'life0 self, _provider_label_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn search_remote<'life0, 'life1, 'async_trait>( &'life0 self, _query: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§