pub enum SyncStateEvent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,{
Original(OriginalSyncStateEvent<C>),
Redacted(RedactedSyncStateEvent<<C as RedactContent>::Redacted>),
}
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
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).
Source§impl 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.
Source§impl 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.
Source§impl 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.
Source§impl 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§
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<&SyncStateEvent<C>> for MinimalStateEvent<C>where
C: Clone + StaticStateEventContent + RedactContent,
C::Redacted: Clone + RedactedStateEventContent,
impl<C> From<&SyncStateEvent<C>> for MinimalStateEvent<C>where
C: Clone + StaticStateEventContent + RedactContent,
C::Redacted: Clone + RedactedStateEventContent,
Source§fn from(ev: &SyncStateEvent<C>) -> Self
fn from(ev: &SyncStateEvent<C>) -> Self
Source§impl From<&SyncStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
impl From<&SyncStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
Source§fn from(ev: &SyncRoomCreateEvent) -> Self
fn from(ev: &SyncRoomCreateEvent) -> Self
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<C> From<SyncStateEvent<C>> for MinimalStateEvent<C>
impl<C> From<SyncStateEvent<C>> for MinimalStateEvent<C>
Source§fn from(ev: SyncStateEvent<C>) -> Self
fn from(ev: SyncStateEvent<C>) -> Self
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.Source§fn from(c: SyncStateEvent<MemberHintsEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<MemberHintsEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<PolicyRuleRoomEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleRoomEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<PolicyRuleRoomEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleRoomEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<PolicyRuleServerEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleServerEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<PolicyRuleServerEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleServerEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<PolicyRuleUserEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleUserEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<PolicyRuleUserEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleUserEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomAliasesEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomAliasesEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomAliasesEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomAliasesEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomAvatarEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomAvatarEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomAvatarEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomAvatarEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomCanonicalAliasEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomCanonicalAliasEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomCanonicalAliasEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomCanonicalAliasEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomCreateEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomCreateEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomCreateEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomCreateEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomEncryptionEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomEncryptionEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomEncryptionEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomEncryptionEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomGuestAccessEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomGuestAccessEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomGuestAccessEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomGuestAccessEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomHistoryVisibilityEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomHistoryVisibilityEventContent>> for AnySyncStateEvent
Source§fn from(
c: SyncStateEvent<RoomHistoryVisibilityEventContent>,
) -> AnySyncStateEvent
fn from( c: SyncStateEvent<RoomHistoryVisibilityEventContent>, ) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomJoinRulesEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomJoinRulesEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomJoinRulesEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomJoinRulesEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomMemberEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomMemberEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomMemberEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomMemberEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomNameEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomNameEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomNameEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomNameEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomPinnedEventsEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomPinnedEventsEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomPinnedEventsEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomPinnedEventsEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomPowerLevelsEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomPowerLevelsEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomPowerLevelsEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomPowerLevelsEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomServerAclEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomServerAclEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomServerAclEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomServerAclEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomThirdPartyInviteEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomThirdPartyInviteEventContent>> for AnySyncStateEvent
Source§fn from(
c: SyncStateEvent<RoomThirdPartyInviteEventContent>,
) -> AnySyncStateEvent
fn from( c: SyncStateEvent<RoomThirdPartyInviteEventContent>, ) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomTombstoneEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomTombstoneEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomTombstoneEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomTombstoneEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<RoomTopicEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomTopicEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<RoomTopicEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomTopicEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<SpaceChildEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<SpaceChildEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<SpaceChildEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<SpaceChildEventContent>) -> AnySyncStateEvent
Source§impl From<SyncStateEvent<SpaceParentEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<SpaceParentEventContent>> for AnySyncStateEvent
Source§fn from(c: SyncStateEvent<SpaceParentEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<SpaceParentEventContent>) -> AnySyncStateEvent
Auto Trait Implementations§
impl<C> Freeze for SyncStateEvent<C>where
<C as RedactContent>::Redacted: Sized + Freeze,
C: Freeze,
<C as StateEventContent>::StateKey: Freeze,
<C as StaticStateEventContent>::Unsigned: Freeze,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Freeze,
impl<C> RefUnwindSafe for SyncStateEvent<C>where
<C as RedactContent>::Redacted: Sized + RefUnwindSafe,
C: RefUnwindSafe,
<C as StateEventContent>::StateKey: RefUnwindSafe,
<C as StaticStateEventContent>::Unsigned: RefUnwindSafe,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: RefUnwindSafe,
impl<C> Send for SyncStateEvent<C>where
<C as RedactContent>::Redacted: Sized + Send,
C: Send,
<C as StateEventContent>::StateKey: Send,
<C as StaticStateEventContent>::Unsigned: Send,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Send,
impl<C> Sync for SyncStateEvent<C>where
<C as RedactContent>::Redacted: Sized + Sync,
C: Sync,
<C as StateEventContent>::StateKey: Sync,
<C as StaticStateEventContent>::Unsigned: Sync,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Sync,
impl<C> Unpin for SyncStateEvent<C>where
<C as RedactContent>::Redacted: Sized + Unpin,
C: Unpin,
<C as StateEventContent>::StateKey: Unpin,
<C as StaticStateEventContent>::Unsigned: Unpin,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Unpin,
impl<C> UnwindSafe for SyncStateEvent<C>where
<C as RedactContent>::Redacted: Sized + UnwindSafe,
C: UnwindSafe,
<C as StateEventContent>::StateKey: UnwindSafe,
<C as StaticStateEventContent>::Unsigned: UnwindSafe,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more