pub struct LeftRoomBuilder { /* private fields */ }
Implementations§
Source§impl LeftRoomBuilder
impl LeftRoomBuilder
Sourcepub fn new(room_id: &RoomId) -> Self
pub fn new(room_id: &RoomId) -> Self
Create a new LeftRoomBuilder
for the given room ID.
If the room ID is DEFAULT_TEST_ROOM_ID
,
LeftRoomBuilder::default()
can be used instead.
Sourcepub fn room_id(&self) -> &RoomId
pub fn room_id(&self) -> &RoomId
Get the room ID of this LeftRoomBuilder
.
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 LeftRoom::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_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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LeftRoomBuilder
impl RefUnwindSafe for LeftRoomBuilder
impl Send for LeftRoomBuilder
impl Sync for LeftRoomBuilder
impl Unpin for LeftRoomBuilder
impl UnwindSafe for LeftRoomBuilder
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
Mutably borrows from an owned value. Read more
§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>
Consume a handle, getting back the initial
Arc<>