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
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