pub struct ThreadPagination(/* private fields */);Expand description
An API object to run pagination queries on a ThreadEventCache.
Implementations§
Source§impl ThreadPagination
impl ThreadPagination
Sourcepub async fn run_backwards_until(
&self,
num_requested_events: u16,
) -> Result<BackPaginationOutcome>
pub async fn run_backwards_until( &self, num_requested_events: u16, ) -> Result<BackPaginationOutcome>
Starts a back-pagination for the requested number of events.
This automatically takes care of waiting for a pagination token from sync, if we haven’t done that before.
It will run multiple back-paginations until one of these two conditions is met:
- either we’ve reached the start of the timeline,
- or we’ve obtained enough events to fulfill the requested number of events.
Sourcepub async fn run_backwards_once(
&self,
batch_size: u16,
) -> Result<BackPaginationOutcome>
pub async fn run_backwards_once( &self, batch_size: u16, ) -> Result<BackPaginationOutcome>
Run a single back-pagination for the requested number of events.
This automatically takes care of waiting for a pagination token from sync, if we haven’t done that before.
Auto Trait Implementations§
impl Freeze for ThreadPagination
impl !RefUnwindSafe for ThreadPagination
impl Send for ThreadPagination
impl Sync for ThreadPagination
impl Unpin for ThreadPagination
impl UnsafeUnpin for ThreadPagination
impl !UnwindSafe for ThreadPagination
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> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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