📝 docs(delete): add documentation for delete trait

- add documentation to explain the purpose of the trait
- add documentation for `batch_delete` method
- add documentation for `prepare` method
This commit is contained in:
Jeremiah Russell
2025-10-13 16:47:48 +01:00
committed by Jeremiah Russell
parent 947de73d64
commit 42ac485354

View File

@@ -2,15 +2,17 @@ use google_gmail1::api::BatchDeleteMessagesRequest;
use crate::{GmailClient, Result, message_list::MessageList}; use crate::{GmailClient, Result, message_list::MessageList};
// /// Struct for deleting messages
// #[derive(Debug)] // #[derive(Debug)]
// pub struct Delete { // pub struct Delete {
// message_list: MessageList, // message_list: MessageList,
// } // }
pub(crate) trait Delete { /// Methods to process items
async fn batch_delete(&self) -> Result<()>; pub trait Delete {
async fn prepare(&mut self, pages: u32) -> Result<()>; /// Batch delete of messages
fn batch_delete(&self) -> impl std::future::Future<Output = Result<()>> + Send;
/// Prepare a list of messages to trash or delete
fn prepare(&mut self, pages: u32) -> impl std::future::Future<Output = Result<()>> + Send;
} }
impl Delete for GmailClient { impl Delete for GmailClient {