Type Alias SyncStickerEvent

pub type SyncStickerEvent = SyncMessageLikeEvent<StickerEventContent>;
Expand description

An m.sticker event from a sync_events response.

Aliased Type§

enum SyncStickerEvent {
    Original(OriginalSyncMessageLikeEvent<StickerEventContent>),
    Redacted(RedactedSyncMessageLikeEvent<RedactedStickerEventContent>),
}

Variants§

§

Original(OriginalSyncMessageLikeEvent<StickerEventContent>)

Original, unredacted form of the event.

§

Redacted(RedactedSyncMessageLikeEvent<RedactedStickerEventContent>)

Redacted form of the event with minimal fields.

Implementations

§

impl<C> SyncMessageLikeEvent<C>

pub fn event_type(&self) -> MessageLikeEventType

Available on crate feature unstable-msc3489 only.

Returns the type of this event.

pub fn event_id(&self) -> &EventId

Available on crate feature unstable-msc3489 only.

Returns this event’s event_id field.

pub fn sender(&self) -> &UserId

Available on crate feature unstable-msc3489 only.

Returns this event’s sender field.

pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch

Available on crate feature unstable-msc3489 only.

Returns this event’s origin_server_ts field.

pub fn as_original(&self) -> Option<&OriginalSyncMessageLikeEvent<C>>

Available on crate feature unstable-msc3489 only.

Get the inner OriginalSyncMessageLikeEvent if this is an unredacted event.

pub fn into_full_event(self, room_id: OwnedRoomId) -> MessageLikeEvent<C>

Available on crate feature unstable-msc3489 only.

Convert this sync event into a full event (one with a room_id field).

Trait Implementations

§

impl<C> Clone for SyncMessageLikeEvent<C>

§

fn clone(&self) -> SyncMessageLikeEvent<C>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<C> Debug for SyncMessageLikeEvent<C>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de, C> Deserialize<'de> for SyncMessageLikeEvent<C>

§

fn deserialize<D>( deserializer: D, ) -> Result<SyncMessageLikeEvent<C>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl<C> From<MessageLikeEvent<C>> for SyncMessageLikeEvent<C>

§

fn from(full: MessageLikeEvent<C>) -> SyncMessageLikeEvent<C>

Converts to this type from the input type.