pub struct GmailClient { /* private fields */ }Expand description
Struct to capture configuration for List API call.
Implementations§
Source§impl GmailClient
impl GmailClient
Sourcepub async fn new(credential: &str) -> Result<Self>
pub async fn new(credential: &str) -> Result<Self>
Create a new List struct and add the Gmail api connection.
Sourcepub fn get_label_id(&self, name: &str) -> Option<String>
pub fn get_label_id(&self, name: &str) -> Option<String>
Return the id for the name from the labels map.
Returns None if the name is not found in the map.
Sourcepub fn show_label(&self)
pub fn show_label(&self)
Show the label names and related id.
Trait Implementations§
Source§impl Clone for GmailClient
impl Clone for GmailClient
Source§fn clone(&self) -> GmailClient
fn clone(&self) -> GmailClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GmailClient
impl Debug for GmailClient
Source§impl MessageList for GmailClient
impl MessageList for GmailClient
Source§fn set_max_results(&mut self, value: u32)
fn set_max_results(&mut self, value: u32)
Set the maximum results
Source§fn max_results(&self) -> u32
fn max_results(&self) -> u32
Report the maximum results value
Source§fn add_labels_ids(&mut self, label_ids: &[String])
fn add_labels_ids(&mut self, label_ids: &[String])
Add label to the labels collection
Source§fn message_ids(&self) -> Vec<String>
fn message_ids(&self) -> Vec<String>
Get a reference to the message_ids
Source§fn hub(&self) -> Gmail<HttpsConnector<HttpConnector>>
fn hub(&self) -> Gmail<HttpsConnector<HttpConnector>>
Get the hub
Source§async fn messages_list(
&mut self,
next_page_token: Option<String>,
) -> Result<ListMessagesResponse>
async fn messages_list( &mut self, next_page_token: Option<String>, ) -> Result<ListMessagesResponse>
List of messages
Source§async fn log_messages(&mut self) -> Result<()>
async fn log_messages(&mut self) -> Result<()>
Log the initial characters of the subjects of the message in the list
Source§impl RuleProcessor for GmailClient
impl RuleProcessor for GmailClient
Source§fn set_execute(&mut self, value: bool)
fn set_execute(&mut self, value: bool)
Set the execute flag
Source§async fn find_rule_and_messages_for_label(&mut self, label: &str) -> Result<()>
async fn find_rule_and_messages_for_label(&mut self, label: &str) -> Result<()>
Find the rule and messages for the label
Source§async fn prepare(&mut self, pages: u32) -> Result<()>
async fn prepare(&mut self, pages: u32) -> Result<()>
Prepare the message list for delete to be completed on execute by batch_delete
Source§async fn batch_delete(&self) -> Result<()>
async fn batch_delete(&self) -> Result<()>
Run the batch delete on the selected messages
Source§async fn batch_trash(&self) -> Result<()>
async fn batch_trash(&self) -> Result<()>
Move the messages to trash
Auto Trait Implementations§
impl Freeze for GmailClient
impl !RefUnwindSafe for GmailClient
impl Send for GmailClient
impl Sync for GmailClient
impl Unpin for GmailClient
impl !UnwindSafe for GmailClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 more