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) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncTimelineEvent>>,
pub fn add_timeline_bulk<I>(self, events: I) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncTimelineEvent>>,
Add events in bulk to the timeline.
Sourcepub fn add_timeline_state_bulk<I>(self, events: I) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncStateEvent>>,
pub fn add_timeline_state_bulk<I>(self, events: I) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncStateEvent>>,
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) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncStateEvent>>,
pub fn add_state_bulk<I>(self, events: I) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncStateEvent>>,
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) -> Selfwhere
I: IntoIterator<Item = Raw<AnyRoomAccountDataEvent>>,
pub fn add_account_data_bulk<I>(self, events: I) -> Selfwhere
I: IntoIterator<Item = Raw<AnyRoomAccountDataEvent>>,
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 moreSource§impl Debug for JoinedRoomBuilder
impl Debug for JoinedRoomBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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<>