Struct matrix_sdk_test::EventBuilder
source · pub struct EventBuilder { /* private fields */ }
Implementations§
source§impl EventBuilder
impl EventBuilder
pub fn new() -> EventBuilder
pub fn next_server_ts(&self) -> MilliSecondsSinceUnixEpoch
sourcepub fn set_next_ts(&self, value: u64)
pub fn set_next_ts(&self, value: u64)
Set the next server timestamp.
Timestamps will continue to increase by 1 (millisecond) from that value.
pub fn make_message_event_with_id<C: MessageLikeEventContent>( &self, sender: &UserId, room_id: &RoomId, event_id: &EventId, content: C ) -> Raw<AnyTimelineEvent>
pub fn make_state_event<C: StateEventContent>( &self, sender: &UserId, room_id: &RoomId, state_key: &str, content: C, prev_content: Option<C> ) -> Raw<AnyTimelineEvent>
pub fn make_sync_message_event<C: MessageLikeEventContent>( &self, sender: &UserId, content: C ) -> Raw<AnySyncTimelineEvent>
pub fn make_sync_message_event_with_id<C: MessageLikeEventContent>( &self, sender: &UserId, event_id: &EventId, content: C ) -> Raw<AnySyncTimelineEvent>
pub fn make_sync_redacted_message_event<C: RedactedMessageLikeEventContent>( &self, sender: &UserId, content: C ) -> Raw<AnySyncTimelineEvent>
pub fn make_sync_state_event<C: StateEventContent>( &self, sender: &UserId, state_key: &str, content: C, prev_content: Option<C> ) -> Raw<AnySyncTimelineEvent>
pub fn make_sync_redacted_state_event<C: RedactedStateEventContent>( &self, sender: &UserId, state_key: &str, content: C ) -> Raw<AnySyncTimelineEvent>
pub fn make_sync_reaction( &self, sender: &UserId, annotation: &Annotation, timestamp: MilliSecondsSinceUnixEpoch ) -> Raw<AnySyncTimelineEvent>
pub fn make_receipt_event_content( &self, receipts: impl IntoIterator<Item = (OwnedEventId, ReceiptType, OwnedUserId, ReceiptThread)> ) -> ReceiptEventContent
pub fn make_redaction_event( &self, sender: &UserId, redacts: &EventId ) -> Raw<AnySyncTimelineEvent>
pub fn make_reaction_event( &self, sender: &UserId, event_id: &EventId, annotation: &Annotation ) -> Raw<AnySyncTimelineEvent>
Trait Implementations§
source§impl Default for EventBuilder
impl Default for EventBuilder
source§fn default() -> EventBuilder
fn default() -> EventBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for EventBuilder
impl Send for EventBuilder
impl Sync for EventBuilder
impl Unpin for EventBuilder
impl UnwindSafe for EventBuilder
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