pub enum SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,{
Original(OriginalSyncStateEvent<C>),
Redacted(RedactedSyncStateEvent<<C as RedactContent>::Redacted>),
}
events
only.Expand description
A possibly-redacted state event without a room_id
.
SyncStateEvent
implements the comparison traits using only the event_id
field, a sorted list
would be sorted lexicographically based on the event’s EventId
.
Variants§
Original(OriginalSyncStateEvent<C>)
Original, unredacted form of the event.
Redacted(RedactedSyncStateEvent<<C as RedactContent>::Redacted>)
Redacted form of the event with minimal fields.
Implementations§
Source§impl<C> SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + RedactedStateEventContent,
impl<C> SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + RedactedStateEventContent,
Sourcepub fn event_type(&self) -> StateEventType
Available on crate feature unstable-msc3489
only.
pub fn event_type(&self) -> StateEventType
unstable-msc3489
only.Returns the type
of this event.
Sourcepub fn event_id(&self) -> &EventId
Available on crate feature unstable-msc3489
only.
pub fn event_id(&self) -> &EventId
unstable-msc3489
only.Returns this event’s event_id
field.
Sourcepub fn sender(&self) -> &UserId
Available on crate feature unstable-msc3489
only.
pub fn sender(&self) -> &UserId
unstable-msc3489
only.Returns this event’s sender
field.
Sourcepub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Available on crate feature unstable-msc3489
only.
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
unstable-msc3489
only.Returns this event’s origin_server_ts
field.
Sourcepub fn state_key(&self) -> &<C as StateEventContent>::StateKey
Available on crate feature unstable-msc3489
only.
pub fn state_key(&self) -> &<C as StateEventContent>::StateKey
unstable-msc3489
only.Returns this event’s state_key
field.
Sourcepub fn as_original(&self) -> Option<&OriginalSyncStateEvent<C>>
Available on crate feature unstable-msc3489
only.
pub fn as_original(&self) -> Option<&OriginalSyncStateEvent<C>>
unstable-msc3489
only.Get the inner OriginalSyncStateEvent
if this is an unredacted event.
Sourcepub fn into_full_event(self, room_id: OwnedRoomId) -> StateEvent<C>
Available on crate feature unstable-msc3489
only.
pub fn into_full_event(self, room_id: OwnedRoomId) -> StateEvent<C>
unstable-msc3489
only.Convert this sync event into a full event (one with a room_id
field).
Source§impl SyncStateEvent<RoomGuestAccessEventContent>
impl SyncStateEvent<RoomGuestAccessEventContent>
Sourcepub fn guest_access(&self) -> &GuestAccess
Available on crate feature unstable-msc3489
only.
pub fn guest_access(&self) -> &GuestAccess
unstable-msc3489
only.Obtain the guest access policy, regardless of whether this event is redacted.
Source§impl SyncStateEvent<RoomHistoryVisibilityEventContent>
impl SyncStateEvent<RoomHistoryVisibilityEventContent>
Sourcepub fn history_visibility(&self) -> &HistoryVisibility
Available on crate feature unstable-msc3489
only.
pub fn history_visibility(&self) -> &HistoryVisibility
unstable-msc3489
only.Obtain the history visibility, regardless of whether this event is redacted.
Source§impl SyncStateEvent<RoomMemberEventContent>
impl SyncStateEvent<RoomMemberEventContent>
Sourcepub fn membership(&self) -> &MembershipState
Available on crate feature unstable-msc3489
only.
pub fn membership(&self) -> &MembershipState
unstable-msc3489
only.Obtain the membership state, regardless of whether this event is redacted.
Source§impl SyncStateEvent<RoomPowerLevelsEventContent>
impl SyncStateEvent<RoomPowerLevelsEventContent>
Sourcepub fn power_levels(&self) -> RoomPowerLevels
Available on crate feature unstable-msc3489
only.
pub fn power_levels(&self) -> RoomPowerLevels
unstable-msc3489
only.Obtain the effective power levels, regardless of whether this event is redacted.
Trait Implementations§
Source§impl<C> Clone for SyncStateEvent<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Clone,
impl<C> Clone for SyncStateEvent<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Clone,
Source§fn clone(&self) -> SyncStateEvent<C>
fn clone(&self) -> SyncStateEvent<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<C> Debug for SyncStateEvent<C>where
C: Debug + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Debug,
impl<C> Debug for SyncStateEvent<C>where
C: Debug + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Debug,
Source§impl<'de, C> Deserialize<'de> for SyncStateEvent<C>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + EventContentFromType + RedactedStateEventContent,
impl<'de, C> Deserialize<'de> for SyncStateEvent<C>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + EventContentFromType + RedactedStateEventContent,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SyncStateEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SyncStateEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<C> From<StateEvent<C>> for SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
impl<C> From<StateEvent<C>> for SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Source§fn from(full: StateEvent<C>) -> SyncStateEvent<C>
fn from(full: StateEvent<C>) -> SyncStateEvent<C>
Source§impl From<SyncStateEvent<BeaconInfoEventContent>> for AnySyncStateEvent
Available on crate feature unstable-msc3489
only.
impl From<SyncStateEvent<BeaconInfoEventContent>> for AnySyncStateEvent
unstable-msc3489
only.Source§fn from(c: SyncStateEvent<BeaconInfoEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<BeaconInfoEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<CallMemberEventContent>> for AnySyncStateEvent
Available on crate feature unstable-msc3401
only.
impl From<SyncStateEvent<CallMemberEventContent>> for AnySyncStateEvent
unstable-msc3401
only.Source§fn from(c: SyncStateEvent<CallMemberEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<CallMemberEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<MemberHintsEventContent>> for AnySyncStateEvent
Available on crate feature unstable-msc4171
only.
impl From<SyncStateEvent<MemberHintsEventContent>> for AnySyncStateEvent
unstable-msc4171
only.