Struct matrix_sdk_test::JoinedRoomBuilder
source · [−]pub struct JoinedRoomBuilder { /* private fields */ }
Implementations
sourceimpl JoinedRoomBuilder
impl JoinedRoomBuilder
sourcepub fn new(room_id: impl Into<OwnedRoomId>) -> Self
pub fn new(room_id: impl Into<OwnedRoomId>) -> Self
Create a new JoinedRoomBuilder
for the given room ID.
If the room ID is test_json::DEFAULT_SYNC_ROOM_ID
,
JoinedRoomBuilder::default()
can be used instead.
sourcepub fn add_timeline_event(self, event: TimelineTestEvent) -> Self
pub fn add_timeline_event(self, event: TimelineTestEvent) -> Self
Add an event to the timeline.
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: 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) -> 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_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) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncEphemeralRoomEvent>>,
pub fn add_ephemeral_bulk<I>(self, events: I) -> Selfwhere
I: IntoIterator<Item = Raw<AnySyncEphemeralRoomEvent>>,
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) -> 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
Auto Trait Implementations
impl RefUnwindSafe for JoinedRoomBuilder
impl Send for JoinedRoomBuilder
impl Sync for JoinedRoomBuilder
impl Unpin for JoinedRoomBuilder
impl UnwindSafe for JoinedRoomBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more