pub type SyncRoomMemberEvent = SyncStateEvent<RoomMemberEventContent>;
Expand description
An m.room.member
event from a sync_events
response.
Aliased Type§
enum SyncRoomMemberEvent {
Original(OriginalSyncStateEvent<RoomMemberEventContent>),
Redacted(RedactedSyncStateEvent<RedactedRoomMemberEventContent>),
}
Variants§
Original(OriginalSyncStateEvent<RoomMemberEventContent>)
Original, unredacted form of the event.
Redacted(RedactedSyncStateEvent<RedactedRoomMemberEventContent>)
Redacted form of the event with minimal fields.
Implementations§
Source§impl SyncRoomMemberEvent
impl SyncRoomMemberEvent
Sourcepub fn membership(&self) -> &MembershipState
pub fn membership(&self) -> &MembershipState
Obtain the membership state, regardless of whether this event is redacted.
Source§impl<C> SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
C::Redacted: RedactedStateEventContent + RedactedStateEventContent<StateKey = C::StateKey>,
impl<C> SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
C::Redacted: RedactedStateEventContent + RedactedStateEventContent<StateKey = C::StateKey>,
Sourcepub fn event_type(&self) -> StateEventType
pub fn event_type(&self) -> StateEventType
Returns the type
of this event.
Sourcepub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Returns this event’s origin_server_ts
field.
Sourcepub fn as_original(&self) -> Option<&OriginalSyncStateEvent<C>>
pub fn as_original(&self) -> Option<&OriginalSyncStateEvent<C>>
Get the inner OriginalSyncStateEvent
if this is an unredacted event.
Sourcepub fn into_full_event(self, room_id: OwnedRoomId) -> StateEvent<C>
pub fn into_full_event(self, room_id: OwnedRoomId) -> StateEvent<C>
Convert this sync event into a full event (one with a room_id
field).
Trait Implementations
Source§impl<C: Clone + StaticStateEventContent + RedactContent> Clone for SyncStateEvent<C>
impl<C: Clone + StaticStateEventContent + RedactContent> Clone for SyncStateEvent<C>
Source§fn clone(&self) -> SyncStateEvent<C>
fn clone(&self) -> SyncStateEvent<C>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C: Debug + StaticStateEventContent + RedactContent> Debug for SyncStateEvent<C>
impl<C: Debug + StaticStateEventContent + RedactContent> Debug for SyncStateEvent<C>
Source§impl<'de, C> Deserialize<'de> for SyncStateEvent<C>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
C::Redacted: RedactedStateEventContent + EventContentFromType + RedactedStateEventContent<StateKey = C::StateKey>,
impl<'de, C> Deserialize<'de> for SyncStateEvent<C>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
C::Redacted: RedactedStateEventContent + EventContentFromType + RedactedStateEventContent<StateKey = C::StateKey>,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<C> From<StateEvent<C>> for SyncStateEvent<C>
impl<C> From<StateEvent<C>> for SyncStateEvent<C>
Source§fn from(full: StateEvent<C>) -> Self
fn from(full: StateEvent<C>) -> Self
Converts to this type from the input type.