#[non_exhaustive]pub enum AnyStateEvent {
Show 27 variants
PolicyRuleRoom(PolicyRuleRoomEvent),
PolicyRuleServer(PolicyRuleServerEvent),
PolicyRuleUser(PolicyRuleUserEvent),
RoomAliases(RoomAliasesEvent),
RoomAvatar(RoomAvatarEvent),
RoomCanonicalAlias(RoomCanonicalAliasEvent),
RoomCreate(RoomCreateEvent),
RoomEncryption(RoomEncryptionEvent),
RoomEncrypted(StateRoomEncryptedEvent),
RoomGuestAccess(RoomGuestAccessEvent),
RoomHistoryVisibility(RoomHistoryVisibilityEvent),
RoomJoinRules(RoomJoinRulesEvent),
RoomLanguage(RoomLanguageEvent),
RoomMember(RoomMemberEvent),
RoomName(RoomNameEvent),
RoomPinnedEvents(RoomPinnedEventsEvent),
RoomPowerLevels(RoomPowerLevelsEvent),
RoomServerAcl(RoomServerAclEvent),
RoomThirdPartyInvite(RoomThirdPartyInviteEvent),
RoomTombstone(RoomTombstoneEvent),
RoomTopic(RoomTopicEvent),
SpaceChild(SpaceChildEvent),
SpaceParent(SpaceParentEvent),
RoomImagePack(RoomImagePackEvent),
BeaconInfo(BeaconInfoEvent),
CallMember(CallMemberEvent),
MemberHints(MemberHintsEvent),
}Expand description
Any state event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PolicyRuleRoom(PolicyRuleRoomEvent)
m.policy.rule.room
PolicyRuleServer(PolicyRuleServerEvent)
m.policy.rule.server
PolicyRuleUser(PolicyRuleUserEvent)
m.policy.rule.user
RoomAliases(RoomAliasesEvent)
m.room.aliases
RoomAvatar(RoomAvatarEvent)
m.room.avatar
RoomCanonicalAlias(RoomCanonicalAliasEvent)
m.room.canonical_alias
RoomCreate(RoomCreateEvent)
m.room.create
RoomEncryption(RoomEncryptionEvent)
m.room.encryption
RoomEncrypted(StateRoomEncryptedEvent)
m.room.encrypted
RoomGuestAccess(RoomGuestAccessEvent)
m.room.guest_access
RoomHistoryVisibility(RoomHistoryVisibilityEvent)
m.room.history_visibility
RoomJoinRules(RoomJoinRulesEvent)
m.room.join_rules
RoomLanguage(RoomLanguageEvent)
m.room.language
This variant uses the unstable type org.matrix.msc4334.room.language.
This variant can also be deserialized from the m.room.language type.
RoomMember(RoomMemberEvent)
m.room.member
RoomName(RoomNameEvent)
m.room.name
RoomPinnedEvents(RoomPinnedEventsEvent)
m.room.pinned_events
RoomPowerLevels(RoomPowerLevelsEvent)
m.room.power_levels
RoomServerAcl(RoomServerAclEvent)
m.room.server_acl
RoomThirdPartyInvite(RoomThirdPartyInviteEvent)
m.room.third_party_invite
RoomTombstone(RoomTombstoneEvent)
m.room.tombstone
RoomTopic(RoomTopicEvent)
m.room.topic
SpaceChild(SpaceChildEvent)
m.space.child
SpaceParent(SpaceParentEvent)
m.space.parent
RoomImagePack(RoomImagePackEvent)
m.image_pack
This variant uses the unstable type im.ponies.room_emotes.
This variant can also be deserialized from the m.image_pack type.
BeaconInfo(BeaconInfoEvent)
m.beacon_info
This variant uses the unstable type org.matrix.msc3672.beacon_info.
This variant can also be deserialized from the m.beacon_info type.
CallMember(CallMemberEvent)
m.call.member
This variant uses the unstable type org.matrix.msc3401.call.member.
This variant can also be deserialized from the m.call.member type.
MemberHints(MemberHintsEvent)
m.member_hints
This variant uses the unstable type io.element.functional_members.
This variant can also be deserialized from the m.member_hints type.
Implementations§
Source§impl AnyStateEvent
impl AnyStateEvent
Sourcepub fn event_type(&self) -> StateEventType
pub fn event_type(&self) -> StateEventType
Returns the type of this event.
Sourcepub fn original_content(&self) -> Option<AnyStateEventContent>
pub fn original_content(&self) -> Option<AnyStateEventContent>
Returns the content for this event if it is not redacted, or None if it is.
Sourcepub fn is_redacted(&self) -> bool
pub fn is_redacted(&self) -> bool
Returns whether this event is redacted.
Sourcepub fn content(&self) -> AnyFullStateEventContent
pub fn content(&self) -> AnyFullStateEventContent
Returns the content of this state 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 transaction_id(&self) -> Option<&TransactionId>
pub fn transaction_id(&self) -> Option<&TransactionId>
Returns this event’s transaction_id from inside unsigned, if there is one.
Trait Implementations§
Source§impl Clone for AnyStateEvent
impl Clone for AnyStateEvent
Source§fn clone(&self) -> AnyStateEvent
fn clone(&self) -> AnyStateEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnyStateEvent
impl Debug for AnyStateEvent
Source§impl<'de> Deserialize<'de> for AnyStateEvent
impl<'de> Deserialize<'de> for AnyStateEvent
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>,
Source§impl From<AnyStateEvent> for AnySyncStateEvent
impl From<AnyStateEvent> for AnySyncStateEvent
Source§fn from(event: AnyStateEvent) -> Self
fn from(event: AnyStateEvent) -> Self
Source§impl From<AnyStateEvent> for AnyTimelineEvent
impl From<AnyStateEvent> for AnyTimelineEvent
Source§fn from(c: AnyStateEvent) -> Self
fn from(c: AnyStateEvent) -> Self
Source§impl From<StateEvent<BeaconInfoEventContent>> for AnyStateEvent
Available on crate feature unstable-msc3489 only.
impl From<StateEvent<BeaconInfoEventContent>> for AnyStateEvent
unstable-msc3489 only.Source§fn from(c: BeaconInfoEvent) -> Self
fn from(c: BeaconInfoEvent) -> Self
Source§impl From<StateEvent<CallMemberEventContent>> for AnyStateEvent
Available on crate feature unstable-msc3401 only.
impl From<StateEvent<CallMemberEventContent>> for AnyStateEvent
unstable-msc3401 only.Source§fn from(c: CallMemberEvent) -> Self
fn from(c: CallMemberEvent) -> Self
Source§impl From<StateEvent<MemberHintsEventContent>> for AnyStateEvent
Available on crate feature unstable-msc4171 only.
impl From<StateEvent<MemberHintsEventContent>> for AnyStateEvent
unstable-msc4171 only.Source§fn from(c: MemberHintsEvent) -> Self
fn from(c: MemberHintsEvent) -> Self
Source§impl From<StateEvent<PolicyRuleRoomEventContent>> for AnyStateEvent
impl From<StateEvent<PolicyRuleRoomEventContent>> for AnyStateEvent
Source§fn from(c: PolicyRuleRoomEvent) -> Self
fn from(c: PolicyRuleRoomEvent) -> Self
Source§impl From<StateEvent<PolicyRuleServerEventContent>> for AnyStateEvent
impl From<StateEvent<PolicyRuleServerEventContent>> for AnyStateEvent
Source§fn from(c: PolicyRuleServerEvent) -> Self
fn from(c: PolicyRuleServerEvent) -> Self
Source§impl From<StateEvent<PolicyRuleUserEventContent>> for AnyStateEvent
impl From<StateEvent<PolicyRuleUserEventContent>> for AnyStateEvent
Source§fn from(c: PolicyRuleUserEvent) -> Self
fn from(c: PolicyRuleUserEvent) -> Self
Source§impl From<StateEvent<RoomAliasesEventContent>> for AnyStateEvent
impl From<StateEvent<RoomAliasesEventContent>> for AnyStateEvent
Source§fn from(c: RoomAliasesEvent) -> Self
fn from(c: RoomAliasesEvent) -> Self
Source§impl From<StateEvent<RoomAvatarEventContent>> for AnyStateEvent
impl From<StateEvent<RoomAvatarEventContent>> for AnyStateEvent
Source§fn from(c: RoomAvatarEvent) -> Self
fn from(c: RoomAvatarEvent) -> Self
Source§impl From<StateEvent<RoomCanonicalAliasEventContent>> for AnyStateEvent
impl From<StateEvent<RoomCanonicalAliasEventContent>> for AnyStateEvent
Source§fn from(c: RoomCanonicalAliasEvent) -> Self
fn from(c: RoomCanonicalAliasEvent) -> Self
Source§impl From<StateEvent<RoomCreateEventContent>> for AnyStateEvent
impl From<StateEvent<RoomCreateEventContent>> for AnyStateEvent
Source§fn from(c: RoomCreateEvent) -> Self
fn from(c: RoomCreateEvent) -> Self
Source§impl From<StateEvent<RoomEncryptionEventContent>> for AnyStateEvent
impl From<StateEvent<RoomEncryptionEventContent>> for AnyStateEvent
Source§fn from(c: RoomEncryptionEvent) -> Self
fn from(c: RoomEncryptionEvent) -> Self
Source§impl From<StateEvent<RoomGuestAccessEventContent>> for AnyStateEvent
impl From<StateEvent<RoomGuestAccessEventContent>> for AnyStateEvent
Source§fn from(c: RoomGuestAccessEvent) -> Self
fn from(c: RoomGuestAccessEvent) -> Self
Source§impl From<StateEvent<RoomHistoryVisibilityEventContent>> for AnyStateEvent
impl From<StateEvent<RoomHistoryVisibilityEventContent>> for AnyStateEvent
Source§fn from(c: RoomHistoryVisibilityEvent) -> Self
fn from(c: RoomHistoryVisibilityEvent) -> Self
Source§impl From<StateEvent<RoomImagePackEventContent>> for AnyStateEvent
Available on crate feature unstable-msc2545 only.
impl From<StateEvent<RoomImagePackEventContent>> for AnyStateEvent
unstable-msc2545 only.Source§fn from(c: RoomImagePackEvent) -> Self
fn from(c: RoomImagePackEvent) -> Self
Source§impl From<StateEvent<RoomJoinRulesEventContent>> for AnyStateEvent
impl From<StateEvent<RoomJoinRulesEventContent>> for AnyStateEvent
Source§fn from(c: RoomJoinRulesEvent) -> Self
fn from(c: RoomJoinRulesEvent) -> Self
Source§impl From<StateEvent<RoomLanguageEventContent>> for AnyStateEvent
Available on crate feature unstable-msc4334 only.
impl From<StateEvent<RoomLanguageEventContent>> for AnyStateEvent
unstable-msc4334 only.Source§fn from(c: RoomLanguageEvent) -> Self
fn from(c: RoomLanguageEvent) -> Self
Source§impl From<StateEvent<RoomMemberEventContent>> for AnyStateEvent
impl From<StateEvent<RoomMemberEventContent>> for AnyStateEvent
Source§fn from(c: RoomMemberEvent) -> Self
fn from(c: RoomMemberEvent) -> Self
Source§impl From<StateEvent<RoomNameEventContent>> for AnyStateEvent
impl From<StateEvent<RoomNameEventContent>> for AnyStateEvent
Source§fn from(c: RoomNameEvent) -> Self
fn from(c: RoomNameEvent) -> Self
Source§impl From<StateEvent<RoomPinnedEventsEventContent>> for AnyStateEvent
impl From<StateEvent<RoomPinnedEventsEventContent>> for AnyStateEvent
Source§fn from(c: RoomPinnedEventsEvent) -> Self
fn from(c: RoomPinnedEventsEvent) -> Self
Source§impl From<StateEvent<RoomPowerLevelsEventContent>> for AnyStateEvent
impl From<StateEvent<RoomPowerLevelsEventContent>> for AnyStateEvent
Source§fn from(c: RoomPowerLevelsEvent) -> Self
fn from(c: RoomPowerLevelsEvent) -> Self
Source§impl From<StateEvent<RoomServerAclEventContent>> for AnyStateEvent
impl From<StateEvent<RoomServerAclEventContent>> for AnyStateEvent
Source§fn from(c: RoomServerAclEvent) -> Self
fn from(c: RoomServerAclEvent) -> Self
Source§impl From<StateEvent<RoomThirdPartyInviteEventContent>> for AnyStateEvent
impl From<StateEvent<RoomThirdPartyInviteEventContent>> for AnyStateEvent
Source§fn from(c: RoomThirdPartyInviteEvent) -> Self
fn from(c: RoomThirdPartyInviteEvent) -> Self
Source§impl From<StateEvent<RoomTombstoneEventContent>> for AnyStateEvent
impl From<StateEvent<RoomTombstoneEventContent>> for AnyStateEvent
Source§fn from(c: RoomTombstoneEvent) -> Self
fn from(c: RoomTombstoneEvent) -> Self
Source§impl From<StateEvent<RoomTopicEventContent>> for AnyStateEvent
impl From<StateEvent<RoomTopicEventContent>> for AnyStateEvent
Source§fn from(c: RoomTopicEvent) -> Self
fn from(c: RoomTopicEvent) -> Self
Source§impl From<StateEvent<SpaceChildEventContent>> for AnyStateEvent
impl From<StateEvent<SpaceChildEventContent>> for AnyStateEvent
Source§fn from(c: SpaceChildEvent) -> Self
fn from(c: SpaceChildEvent) -> Self
Source§impl From<StateEvent<SpaceParentEventContent>> for AnyStateEvent
impl From<StateEvent<SpaceParentEventContent>> for AnyStateEvent
Source§fn from(c: SpaceParentEvent) -> Self
fn from(c: SpaceParentEvent) -> Self
Source§impl From<StateEvent<StateRoomEncryptedEventContent>> for AnyStateEvent
Available on crate feature unstable-msc3414 only.
impl From<StateEvent<StateRoomEncryptedEventContent>> for AnyStateEvent
unstable-msc3414 only.