Trait matrix_sdk::event_cache::paginator::PaginableRoom
source · pub trait PaginableRoom: SendOutsideWasm + SyncOutsideWasm {
// Required methods
fn event_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId,
lazy_load_members: bool,
num_events: UInt
) -> Pin<Box<dyn Future<Output = Result<EventWithContextResponse, PaginatorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn messages<'life0, 'async_trait>(
&'life0 self,
opts: MessagesOptions
) -> Pin<Box<dyn Future<Output = Result<Messages, PaginatorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A room that can be paginated.
Not crate::Room
because we may want to paginate rooms we don’t belong
to.
Required Methods§
sourcefn event_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId,
lazy_load_members: bool,
num_events: UInt
) -> Pin<Box<dyn Future<Output = Result<EventWithContextResponse, PaginatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn event_with_context<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId,
lazy_load_members: bool,
num_events: UInt
) -> Pin<Box<dyn Future<Output = Result<EventWithContextResponse, PaginatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Runs a /context query for the given room.
§Parameters
event_id
is the identifier of the target event.lazy_load_members
controls whether room membership events are lazily loaded as context state events.num_events
is the number of events (including the fetched event) to return as context.
§Returns
Must return PaginatorError::EventNotFound
whenever the target event
could not be found, instead of causing an http Err
result.
sourcefn messages<'life0, 'async_trait>(
&'life0 self,
opts: MessagesOptions
) -> Pin<Box<dyn Future<Output = Result<Messages, PaginatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn messages<'life0, 'async_trait>(
&'life0 self,
opts: MessagesOptions
) -> Pin<Box<dyn Future<Output = Result<Messages, PaginatorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs a /messages query for the given room.