Enum ruma::events::SyncStateEvent
source · [−]pub enum SyncStateEvent<C>where
C: StateEventContent + 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
sourceimpl<C> SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: StateEventContent,
<<C as RedactContent>::Redacted as StateEventContent>::StateKey == <C as StateEventContent>::StateKey,
impl<C> SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: StateEventContent,
<<C as RedactContent>::Redacted as StateEventContent>::StateKey == <C as StateEventContent>::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 state_key(&self) -> &<C as StateEventContent>::StateKey
pub fn state_key(&self) -> &<C as StateEventContent>::StateKey
Returns this event’s state_key
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).
sourceimpl SyncStateEvent<RoomGuestAccessEventContent>
impl SyncStateEvent<RoomGuestAccessEventContent>
sourcepub fn guest_access(&self) -> &GuestAccess
pub fn guest_access(&self) -> &GuestAccess
Obtain the guest access policy, regardless of whether this event is redacted.
sourceimpl SyncStateEvent<RoomHistoryVisibilityEventContent>
impl SyncStateEvent<RoomHistoryVisibilityEventContent>
sourcepub fn history_visibility(&self) -> &HistoryVisibility
pub fn history_visibility(&self) -> &HistoryVisibility
Obtain the history visibility, regardless of whether this event is redacted.
sourceimpl SyncStateEvent<RoomMemberEventContent>
impl SyncStateEvent<RoomMemberEventContent>
sourcepub fn membership(&self) -> &MembershipState
pub fn membership(&self) -> &MembershipState
Obtain the membership state, regardless of whether this event is redacted.
sourceimpl SyncStateEvent<RoomPowerLevelsEventContent>
impl SyncStateEvent<RoomPowerLevelsEventContent>
sourcepub fn power_levels(&self) -> RoomPowerLevels
pub fn power_levels(&self) -> RoomPowerLevels
Obtain the effective power levels, regardless of whether this event is redacted.
Trait Implementations
sourceimpl<C> Clone for SyncStateEvent<C>where
C: Clone + StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: Clone,
impl<C> Clone for SyncStateEvent<C>where
C: Clone + StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: Clone,
sourcefn clone(&self) -> SyncStateEvent<C>
fn clone(&self) -> SyncStateEvent<C>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<C> Debug for SyncStateEvent<C>where
C: Debug + StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: Debug,
impl<C> Debug for SyncStateEvent<C>where
C: Debug + StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: Debug,
sourceimpl<'de, C> Deserialize<'de> for SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: StateEventContent,
<<C as RedactContent>::Redacted as StateEventContent>::StateKey == <C as StateEventContent>::StateKey,
impl<'de, C> Deserialize<'de> for SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: StateEventContent,
<<C as RedactContent>::Redacted as StateEventContent>::StateKey == <C as StateEventContent>::StateKey,
sourcefn 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>,
sourceimpl<C> From<StateEvent<C>> for SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
impl<C> From<StateEvent<C>> for SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
sourcefn from(full: StateEvent<C>) -> SyncStateEvent<C>
fn from(full: StateEvent<C>) -> SyncStateEvent<C>
sourceimpl From<SyncStateEvent<PolicyRuleRoomEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleRoomEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<PolicyRuleRoomEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleRoomEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<PolicyRuleServerEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleServerEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<PolicyRuleServerEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleServerEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<PolicyRuleUserEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleUserEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<PolicyRuleUserEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleUserEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomAliasesEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomAliasesEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomAliasesEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomAliasesEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomAvatarEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomAvatarEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomAvatarEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomAvatarEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomCanonicalAliasEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomCanonicalAliasEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomCanonicalAliasEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomCanonicalAliasEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomCreateEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomCreateEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomCreateEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomCreateEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomEncryptionEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomEncryptionEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomEncryptionEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomEncryptionEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomGuestAccessEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomGuestAccessEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomGuestAccessEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomGuestAccessEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomHistoryVisibilityEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomHistoryVisibilityEventContent>> for AnySyncStateEvent
sourcefn from(
c: SyncStateEvent<RoomHistoryVisibilityEventContent>
) -> AnySyncStateEvent
fn from(
c: SyncStateEvent<RoomHistoryVisibilityEventContent>
) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomJoinRulesEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomJoinRulesEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomJoinRulesEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomJoinRulesEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomMemberEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomMemberEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomMemberEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomMemberEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomNameEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomNameEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomNameEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomNameEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomPinnedEventsEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomPinnedEventsEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomPinnedEventsEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomPinnedEventsEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomPowerLevelsEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomPowerLevelsEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomPowerLevelsEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomPowerLevelsEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomServerAclEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomServerAclEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomServerAclEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomServerAclEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomThirdPartyInviteEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomThirdPartyInviteEventContent>> for AnySyncStateEvent
sourcefn from(
c: SyncStateEvent<RoomThirdPartyInviteEventContent>
) -> AnySyncStateEvent
fn from(
c: SyncStateEvent<RoomThirdPartyInviteEventContent>
) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomTombstoneEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomTombstoneEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomTombstoneEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomTombstoneEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<RoomTopicEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomTopicEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomTopicEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomTopicEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<SpaceChildEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<SpaceChildEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<SpaceChildEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<SpaceChildEventContent>) -> AnySyncStateEvent
sourceimpl From<SyncStateEvent<SpaceParentEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<SpaceParentEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<SpaceParentEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<SpaceParentEventContent>) -> AnySyncStateEvent
sourceimpl<C> Redact for SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: StateEventContent,
<<C as RedactContent>::Redacted as StateEventContent>::StateKey == <C as StateEventContent>::StateKey,
impl<C> Redact for SyncStateEvent<C>where
C: StateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as RedactContent>::Redacted: StateEventContent,
<<C as RedactContent>::Redacted as StateEventContent>::StateKey == <C as StateEventContent>::StateKey,
type Redacted = SyncStateEvent<C>
type Redacted = SyncStateEvent<C>
sourcefn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> SyncStateEvent<C>
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> SyncStateEvent<C>
self
into a redacted form (removing most fields) according to the spec. Read more