pub struct ThreadsApi<'a> { /* private fields */ }Expand description
Threads API façade.
Implementations§
Source§impl<'a> ThreadsApi<'a>
impl<'a> ThreadsApi<'a>
Sourcepub fn new(client: &'a GmailClient) -> Self
pub fn new(client: &'a GmailClient) -> Self
Wraps an existing GmailClient for thread operations.
Sourcepub async fn search(
&self,
query: Option<&str>,
label_ids: &[&str],
limit: usize,
page_token: Option<&str>,
) -> Result<ThreadListResponse>
pub async fn search( &self, query: Option<&str>, label_ids: &[&str], limit: usize, page_token: Option<&str>, ) -> Result<ThreadListResponse>
Searches threads matching query, returning a single page.
limit is rejected client-side when it exceeds MAX_PAGE_LIMIT;
use Self::search_all to auto-paginate across pages.
Sourcepub async fn search_all(
&self,
query: Option<&str>,
label_ids: &[&str],
limit: usize,
) -> Result<ThreadListResponse>
pub async fn search_all( &self, query: Option<&str>, label_ids: &[&str], limit: usize, ) -> Result<ThreadListResponse>
Searches threads, auto-paginating via cursor as needed.
Same “cursor-only, never a short page” termination rule as
crate::gmail::messages_api::MessagesApi::search_all.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ThreadsApi<'a>
impl<'a> !UnwindSafe for ThreadsApi<'a>
impl<'a> Freeze for ThreadsApi<'a>
impl<'a> Send for ThreadsApi<'a>
impl<'a> Sync for ThreadsApi<'a>
impl<'a> Unpin for ThreadsApi<'a>
impl<'a> UnsafeUnpin for ThreadsApi<'a>
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