pub struct HistoryApi<'a> { /* private fields */ }Expand description
History API façade.
Implementations§
Source§impl<'a> HistoryApi<'a>
impl<'a> HistoryApi<'a>
Sourcepub fn new(client: &'a GmailClient) -> Self
pub fn new(client: &'a GmailClient) -> Self
Wraps an existing GmailClient for history operations.
Sourcepub async fn list(
&self,
start_history_id: &str,
history_types: &[&str],
limit: usize,
page_token: Option<&str>,
) -> Result<HistoryListResponse>
pub async fn list( &self, start_history_id: &str, history_types: &[&str], limit: usize, page_token: Option<&str>, ) -> Result<HistoryListResponse>
Lists mailbox changes since start_history_id, returning a single
page.
Google returns 404 notFound when start_history_id is older than
the mailbox’s retention window (about a week); gmail sync catches
that specific case and falls back to a full reconciliation pass.
Sourcepub async fn list_all(
&self,
start_history_id: &str,
history_types: &[&str],
limit: usize,
) -> Result<HistoryListResponse>
pub async fn list_all( &self, start_history_id: &str, history_types: &[&str], limit: usize, ) -> Result<HistoryListResponse>
Lists mailbox changes since start_history_id, auto-paginating via
cursor as needed. limit == 0 means “fetch every change up to
HARD_CAP” — a deliberate safety limit for this general-purpose
entry point. See Self::list_all_unbounded for the one caller that
must not have it.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for HistoryApi<'a>
impl<'a> !UnwindSafe for HistoryApi<'a>
impl<'a> Freeze for HistoryApi<'a>
impl<'a> Send for HistoryApi<'a>
impl<'a> Sync for HistoryApi<'a>
impl<'a> Unpin for HistoryApi<'a>
impl<'a> UnsafeUnpin for HistoryApi<'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