pub struct JoinedRoomBuilder { /* private fields */ }
Implementations§
Source§impl JoinedRoomBuilder
impl JoinedRoomBuilder
Sourcepub fn new(room_id: &RoomId) -> Self
pub fn new(room_id: &RoomId) -> Self
Create a new JoinedRoomBuilder
for the given room ID.
If the room ID is DEFAULT_TEST_ROOM_ID
,
JoinedRoomBuilder::default()
can be used instead.
Sourcepub fn room_id(&self) -> &RoomId
pub fn room_id(&self) -> &RoomId
Get the room ID of this JoinedRoomBuilder
.
Sourcepub fn add_timeline_event(
self,
event: impl Into<Raw<AnySyncTimelineEvent>>,
) -> Self
pub fn add_timeline_event( self, event: impl Into<Raw<AnySyncTimelineEvent>>, ) -> Self
Add an event to the timeline.
The raw event can be created with the
sync_timeline_event
macro.
Sourcepub fn add_timeline_bulk<I>(self, events: I) -> Self
pub fn add_timeline_bulk<I>(self, events: I) -> Self
Add events in bulk to the timeline.
Sourcepub fn add_timeline_state_bulk<I>(self, events: I) -> Self
pub fn add_timeline_state_bulk<I>(self, events: I) -> Self
Add state events in bulk to the timeline.
This is a convenience method that casts Raw<AnySyncStateEvent>
to
Raw<AnySyncTimelineEvent>
and calls JoinedRoom::add_timeline_bulk()
.
Sourcepub fn set_timeline_limited(self) -> Self
pub fn set_timeline_limited(self) -> Self
Set the timeline as limited.
Sourcepub fn set_timeline_prev_batch(self, prev_batch: impl Into<String>) -> Self
pub fn set_timeline_prev_batch(self, prev_batch: impl Into<String>) -> Self
Set the prev_batch
of the timeline.
Sourcepub fn use_state_after(self) -> Self
pub fn use_state_after(self) -> Self
Add state events to the state_after
field rather than state
.
Sourcepub fn add_state_event(self, event: impl Into<Raw<AnySyncStateEvent>>) -> Self
pub fn add_state_event(self, event: impl Into<Raw<AnySyncStateEvent>>) -> Self
Add an event to the state.
Sourcepub fn add_state_bulk<I>(self, events: I) -> Self
pub fn add_state_bulk<I>(self, events: I) -> Self
Add events in bulk to the state.
Sourcepub fn add_receipt(self, f: EventBuilder<ReceiptEventContent>) -> Self
pub fn add_receipt(self, f: EventBuilder<ReceiptEventContent>) -> Self
Add a single read receipt to the joined room’s ephemeral events.
Sourcepub fn add_typing(self, f: EventBuilder<TypingEventContent>) -> Self
pub fn add_typing(self, f: EventBuilder<TypingEventContent>) -> Self
Add a typing notification event for this sync.
Sourcepub fn add_account_data(self, event: RoomAccountDataTestEvent) -> Self
pub fn add_account_data(self, event: RoomAccountDataTestEvent) -> Self
Add room account data.
Sourcepub fn add_account_data_bulk<I>(self, events: I) -> Self
pub fn add_account_data_bulk<I>(self, events: I) -> Self
Add room account data in bulk.
Sourcepub fn set_room_summary(self, summary: JsonValue) -> Self
pub fn set_room_summary(self, summary: JsonValue) -> Self
Set the room summary.
Sourcepub fn set_unread_notifications_count(
self,
unread_notifications: JsonValue,
) -> Self
pub fn set_unread_notifications_count( self, unread_notifications: JsonValue, ) -> Self
Set the unread notifications count.
Trait Implementations§
Source§impl Clone for JoinedRoomBuilder
impl Clone for JoinedRoomBuilder
Source§fn clone(&self) -> JoinedRoomBuilder
fn clone(&self) -> JoinedRoomBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more