Trait matrix_sdk::event_cache::paginator::PaginableRoom

source ·
pub trait PaginableRoom: SendOutsideWasm + SyncOutsideWasm {
    // Required methods
    fn event_with_context(
        &self,
        event_id: &EventId,
        lazy_load_members: bool,
        num_events: UInt,
    ) -> impl Future<Output = Result<EventWithContextResponse, PaginatorError>> + SendOutsideWasm;
    fn messages(
        &self,
        opts: MessagesOptions,
    ) -> impl Future<Output = Result<Messages, PaginatorError>> + SendOutsideWasm;
}
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§

source

fn event_with_context( &self, event_id: &EventId, lazy_load_members: bool, num_events: UInt, ) -> impl Future<Output = Result<EventWithContextResponse, PaginatorError>> + SendOutsideWasm

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.

source

fn messages( &self, opts: MessagesOptions, ) -> impl Future<Output = Result<Messages, PaginatorError>> + SendOutsideWasm

Runs a /messages query for the given room.

Object Safety§

This trait is not object safe.

Implementors§