Struct matrix_sdk_test::LeftRoomBuilder
source · [−]pub struct LeftRoomBuilder { /* private fields */ }Implementations
sourceimpl LeftRoomBuilder
impl LeftRoomBuilder
sourcepub fn new(room_id: impl Into<OwnedRoomId>) -> Self
pub fn new(room_id: impl Into<OwnedRoomId>) -> Self
Create a new LeftRoomBuilder for the given room ID.
If the room ID is test_json::DEFAULT_SYNC_ROOM_ID,
LeftRoomBuilder::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 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) -> 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_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.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LeftRoomBuilder
impl Send for LeftRoomBuilder
impl Sync for LeftRoomBuilder
impl Unpin for LeftRoomBuilder
impl UnwindSafe for LeftRoomBuilder
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