pub struct GmailProvider { /* private fields */ }Implementations§
Source§impl GmailProvider
impl GmailProvider
pub fn new(account_id: AccountId, client: GmailClient) -> Self
Trait Implementations§
Source§impl MailSendProvider for GmailProvider
impl MailSendProvider for GmailProvider
fn name(&self) -> &str
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
draft: &'life1 Draft,
from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<SendReceipt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn save_draft<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
draft: &'life1 Draft,
from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_draft<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
draft: &'life1 Draft,
from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save a draft to the mail server. Returns the server-side draft ID if supported.
Default: returns Ok(None) (provider doesn’t support server drafts).
Source§impl MailSyncProvider for GmailProvider
impl MailSyncProvider for GmailProvider
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 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 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,
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,
Auto Trait Implementations§
impl Freeze for GmailProvider
impl !RefUnwindSafe for GmailProvider
impl Send for GmailProvider
impl Sync for GmailProvider
impl Unpin for GmailProvider
impl UnsafeUnpin for GmailProvider
impl !UnwindSafe for GmailProvider
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