pub struct RoomPagination { /* private fields */ }
Expand description
An API object to run pagination queries on a super::RoomEventCache
.
Can be created with super::RoomEventCache::pagination()
.
Implementations§
Source§impl RoomPagination
impl RoomPagination
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.
Sourcepub fn status(&self) -> Subscriber<RoomPaginationStatus>
pub fn status(&self) -> Subscriber<RoomPaginationStatus>
Returns a subscriber to the pagination status used for the back-pagination integrated to the event cache.
Trait Implementations§
Source§impl Clone for RoomPagination
impl Clone for RoomPagination
Source§fn clone(&self) -> RoomPagination
fn clone(&self) -> RoomPagination
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RoomPagination
impl !RefUnwindSafe for RoomPagination
impl Send for RoomPagination
impl Sync for RoomPagination
impl Unpin for RoomPagination
impl !UnwindSafe for RoomPagination
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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