diff --git a/src/gmail_client.rs b/src/gmail_client.rs index a1de336..82a4d13 100644 --- a/src/gmail_client.rs +++ b/src/gmail_client.rs @@ -16,6 +16,7 @@ use crate::{Credential, Error, MessageList, Result}; pub const DEFAULT_MAX_RESULTS: &str = "200"; /// Struct to capture configuration for List API call. +#[derive(Clone)] pub struct GmailClient { hub: Gmail>, label_map: BTreeMap, @@ -110,7 +111,8 @@ impl GmailClient { self.hub.clone() } - pub async fn get_messages(&self) -> Result { - MessageList::new(&self).await + /// Get the message list + pub async fn get_message_list(&self) -> Result { + MessageList::new(self).await } }