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: String) -> Self
pub fn set_timeline_prev_batch(self, prev_batch: String) -> Self
Set the prev_batch
of the timeline.
Sourcepub fn add_state_event(self, event: StateTestEvent) -> Self
pub fn add_state_event(self, event: StateTestEvent) -> 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_ephemeral_event(self, event: EphemeralTestEvent) -> Self
pub fn add_ephemeral_event(self, event: EphemeralTestEvent) -> Self
Add an ephemeral event.
Sourcepub fn add_ephemeral_bulk<I>(self, events: I) -> Self
pub fn add_ephemeral_bulk<I>(self, events: I) -> Self
Add ephemeral events in bulk.
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§
Auto Trait Implementations§
impl Freeze for JoinedRoomBuilder
impl RefUnwindSafe for JoinedRoomBuilder
impl Send for JoinedRoomBuilder
impl Sync for JoinedRoomBuilder
impl Unpin for JoinedRoomBuilder
impl UnwindSafe for JoinedRoomBuilder
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
§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>
Arc<>