Enum matrix_sdk_base::ruma::events::SyncStateEvent
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§
§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,
pub fn event_type(&self) -> StateEventType
pub fn event_type(&self) -> StateEventType
Returns the type
of this event.
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch
Returns this event’s origin_server_ts
field.
pub fn state_key(&self) -> &<C as StateEventContent>::StateKey
pub fn state_key(&self) -> &<C as StateEventContent>::StateKey
Returns this event’s state_key
field.
pub 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.
pub 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).
§impl SyncStateEvent<RoomGuestAccessEventContent>
impl SyncStateEvent<RoomGuestAccessEventContent>
pub fn guest_access(&self) -> &GuestAccess
pub fn guest_access(&self) -> &GuestAccess
Obtain the guest access policy, regardless of whether this event is redacted.
§impl SyncStateEvent<RoomHistoryVisibilityEventContent>
impl SyncStateEvent<RoomHistoryVisibilityEventContent>
pub fn history_visibility(&self) -> &HistoryVisibility
pub fn history_visibility(&self) -> &HistoryVisibility
Obtain the history visibility, regardless of whether this event is redacted.
§impl SyncStateEvent<RoomMemberEventContent>
impl SyncStateEvent<RoomMemberEventContent>
pub fn membership(&self) -> &MembershipState
pub fn membership(&self) -> &MembershipState
Obtain the membership state, regardless of whether this event is redacted.
§impl SyncStateEvent<RoomPowerLevelsEventContent>
impl SyncStateEvent<RoomPowerLevelsEventContent>
pub 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§
§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,
§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 more§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,
§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,
§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
§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,
§fn from(full: StateEvent<C>) -> SyncStateEvent<C>
fn from(full: StateEvent<C>) -> SyncStateEvent<C>
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
§impl From<SyncStateEvent<CallMemberEventContent>> for AnySyncStateEvent
Available on crate feature unstable-msc3401
only.
impl From<SyncStateEvent<CallMemberEventContent>> for AnySyncStateEvent
unstable-msc3401
only.