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§
Sourcefn event_with_context(
&self,
event_id: &EventId,
lazy_load_members: bool,
num_events: UInt,
) -> impl Future<Output = Result<EventWithContextResponse, PaginatorError>> + SendOutsideWasm
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_idis the identifier of the target event.lazy_load_memberscontrols whether room membership events are lazily loaded as context state events.num_eventsis 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(
&self,
opts: MessagesOptions,
) -> impl Future<Output = Result<Messages, PaginatorError>> + SendOutsideWasm
fn messages( &self, opts: MessagesOptions, ) -> impl Future<Output = Result<Messages, PaginatorError>> + SendOutsideWasm
Runs a /messages query for the given room.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.