pub struct GmailService { /* private fields */ }Implementations§
Source§impl GmailService
impl GmailService
pub fn new(config: &Config) -> GmailResult<Self>
Sourcepub async fn get_message_raw(&mut self, message_id: &str) -> GmailResult<String>
pub async fn get_message_raw(&mut self, message_id: &str) -> GmailResult<String>
Get a message by ID and return as raw JSON
Sourcepub async fn list_messages_raw(
&mut self,
max_results: u32,
query: Option<&str>,
) -> GmailResult<String>
pub async fn list_messages_raw( &mut self, max_results: u32, query: Option<&str>, ) -> GmailResult<String>
List messages and return raw JSON response
Sourcepub async fn get_message_details(
&mut self,
message_id: &str,
) -> GmailResult<EmailMessage>
pub async fn get_message_details( &mut self, message_id: &str, ) -> GmailResult<EmailMessage>
Get message details with all metadata and content
Sourcepub async fn list_messages(
&mut self,
max_results: u32,
query: Option<&str>,
) -> GmailResult<Vec<EmailMessage>>
pub async fn list_messages( &mut self, max_results: u32, query: Option<&str>, ) -> GmailResult<Vec<EmailMessage>>
List messages and parse metadata into structured EmailMessage objects
Sourcepub async fn list_labels(&mut self) -> GmailResult<String>
pub async fn list_labels(&mut self) -> GmailResult<String>
List labels and return raw JSON response
Sourcepub async fn check_connection_raw(&mut self) -> GmailResult<String>
pub async fn check_connection_raw(&mut self) -> GmailResult<String>
Check connection by getting profile and return raw JSON response
Sourcepub async fn check_connection(&mut self) -> GmailResult<(String, u64)>
pub async fn check_connection(&mut self) -> GmailResult<(String, u64)>
Check connection by getting profile and return email and message count
Sourcepub async fn create_draft(&mut self, draft: &DraftEmail) -> GmailResult<String>
pub async fn create_draft(&mut self, draft: &DraftEmail) -> GmailResult<String>
Create a draft email in Gmail
Auto Trait Implementations§
impl !RefUnwindSafe for GmailService
impl !UnwindSafe for GmailService
impl Freeze for GmailService
impl Send for GmailService
impl Sync for GmailService
impl Unpin for GmailService
impl UnsafeUnpin for GmailService
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