Enum ruma::events::AnySyncStateEvent
source · [−]pub enum AnySyncStateEvent {
Show 21 variants
PolicyRuleRoom(SyncStateEvent<PolicyRuleRoomEventContent>),
PolicyRuleServer(SyncStateEvent<PolicyRuleServerEventContent>),
PolicyRuleUser(SyncStateEvent<PolicyRuleUserEventContent>),
RoomAliases(SyncStateEvent<RoomAliasesEventContent>),
RoomAvatar(SyncStateEvent<RoomAvatarEventContent>),
RoomCanonicalAlias(SyncStateEvent<RoomCanonicalAliasEventContent>),
RoomCreate(SyncStateEvent<RoomCreateEventContent>),
RoomEncryption(SyncStateEvent<RoomEncryptionEventContent>),
RoomGuestAccess(SyncStateEvent<RoomGuestAccessEventContent>),
RoomHistoryVisibility(SyncStateEvent<RoomHistoryVisibilityEventContent>),
RoomJoinRules(SyncStateEvent<RoomJoinRulesEventContent>),
RoomMember(SyncStateEvent<RoomMemberEventContent>),
RoomName(SyncStateEvent<RoomNameEventContent>),
RoomPinnedEvents(SyncStateEvent<RoomPinnedEventsEventContent>),
RoomPowerLevels(SyncStateEvent<RoomPowerLevelsEventContent>),
RoomServerAcl(SyncStateEvent<RoomServerAclEventContent>),
RoomThirdPartyInvite(SyncStateEvent<RoomThirdPartyInviteEventContent>),
RoomTombstone(SyncStateEvent<RoomTombstoneEventContent>),
RoomTopic(SyncStateEvent<RoomTopicEventContent>),
SpaceChild(SyncStateEvent<SpaceChildEventContent>),
SpaceParent(SyncStateEvent<SpaceParentEventContent>),
// some variants omitted
}
Available on crate feature
events
only.Expand description
Any state event.
Variants
PolicyRuleRoom(SyncStateEvent<PolicyRuleRoomEventContent>)
m.policy.rule.room
PolicyRuleServer(SyncStateEvent<PolicyRuleServerEventContent>)
m.policy.rule.server
PolicyRuleUser(SyncStateEvent<PolicyRuleUserEventContent>)
m.policy.rule.user
RoomAliases(SyncStateEvent<RoomAliasesEventContent>)
m.room.aliases
RoomAvatar(SyncStateEvent<RoomAvatarEventContent>)
m.room.avatar
RoomCanonicalAlias(SyncStateEvent<RoomCanonicalAliasEventContent>)
m.room.canonical_alias
RoomCreate(SyncStateEvent<RoomCreateEventContent>)
m.room.create
RoomEncryption(SyncStateEvent<RoomEncryptionEventContent>)
m.room.encryption
RoomGuestAccess(SyncStateEvent<RoomGuestAccessEventContent>)
m.room.guest_access
RoomHistoryVisibility(SyncStateEvent<RoomHistoryVisibilityEventContent>)
m.room.history_visibility
RoomJoinRules(SyncStateEvent<RoomJoinRulesEventContent>)
m.room.join_rules
RoomMember(SyncStateEvent<RoomMemberEventContent>)
m.room.member
RoomName(SyncStateEvent<RoomNameEventContent>)
m.room.name
RoomPinnedEvents(SyncStateEvent<RoomPinnedEventsEventContent>)
m.room.pinned_events
RoomPowerLevels(SyncStateEvent<RoomPowerLevelsEventContent>)
m.room.power_levels
RoomServerAcl(SyncStateEvent<RoomServerAclEventContent>)
m.room.server_acl
RoomThirdPartyInvite(SyncStateEvent<RoomThirdPartyInviteEventContent>)
m.room.third_party_invite
RoomTombstone(SyncStateEvent<RoomTombstoneEventContent>)
m.room.tombstone
RoomTopic(SyncStateEvent<RoomTopicEventContent>)
m.room.topic
SpaceChild(SyncStateEvent<SpaceChildEventContent>)
m.space.child
SpaceParent(SyncStateEvent<SpaceParentEventContent>)
m.space.parent
Implementations
sourceimpl AnySyncStateEvent
impl AnySyncStateEvent
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 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.
sourceimpl AnySyncStateEvent
impl AnySyncStateEvent
sourcepub fn into_full_event(self, room_id: OwnedRoomId) -> AnyStateEvent
pub fn into_full_event(self, room_id: OwnedRoomId) -> AnyStateEvent
Convert this sync event into a full event (one with a room_id
field).
Trait Implementations
sourceimpl Clone for AnySyncStateEvent
impl Clone for AnySyncStateEvent
sourcefn clone(&self) -> AnySyncStateEvent
fn clone(&self) -> AnySyncStateEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AnySyncStateEvent
impl Debug for AnySyncStateEvent
sourceimpl<'de> Deserialize<'de> for AnySyncStateEvent
impl<'de> Deserialize<'de> for AnySyncStateEvent
sourcefn deserialize<D>(
deserializer: D
) -> Result<AnySyncStateEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<AnySyncStateEvent, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<AnyStateEvent> for AnySyncStateEvent
impl From<AnyStateEvent> for AnySyncStateEvent
sourcefn from(event: AnyStateEvent) -> AnySyncStateEvent
fn from(event: AnyStateEvent) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<AnySyncStateEvent> for AnySyncTimelineEvent
impl From<AnySyncStateEvent> for AnySyncTimelineEvent
sourcefn from(c: AnySyncStateEvent) -> AnySyncTimelineEvent
fn from(c: AnySyncStateEvent) -> AnySyncTimelineEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<PolicyRuleRoomEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleRoomEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<PolicyRuleRoomEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleRoomEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<PolicyRuleServerEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleServerEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<PolicyRuleServerEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleServerEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<PolicyRuleUserEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<PolicyRuleUserEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<PolicyRuleUserEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<PolicyRuleUserEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomAliasesEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomAliasesEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomAliasesEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomAliasesEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomAvatarEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomAvatarEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomAvatarEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomAvatarEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomCanonicalAliasEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomCanonicalAliasEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomCanonicalAliasEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomCanonicalAliasEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomCreateEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomCreateEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomCreateEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomCreateEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomEncryptionEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomEncryptionEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomEncryptionEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomEncryptionEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomGuestAccessEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomGuestAccessEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomGuestAccessEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomGuestAccessEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomHistoryVisibilityEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomHistoryVisibilityEventContent>> for AnySyncStateEvent
sourcefn from(
c: SyncStateEvent<RoomHistoryVisibilityEventContent>
) -> AnySyncStateEvent
fn from(
c: SyncStateEvent<RoomHistoryVisibilityEventContent>
) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomJoinRulesEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomJoinRulesEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomJoinRulesEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomJoinRulesEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomMemberEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomMemberEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomMemberEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomMemberEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomNameEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomNameEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomNameEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomNameEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomPinnedEventsEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomPinnedEventsEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomPinnedEventsEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomPinnedEventsEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomPowerLevelsEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomPowerLevelsEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomPowerLevelsEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomPowerLevelsEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomServerAclEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomServerAclEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomServerAclEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomServerAclEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomThirdPartyInviteEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomThirdPartyInviteEventContent>> for AnySyncStateEvent
sourcefn from(
c: SyncStateEvent<RoomThirdPartyInviteEventContent>
) -> AnySyncStateEvent
fn from(
c: SyncStateEvent<RoomThirdPartyInviteEventContent>
) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomTombstoneEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomTombstoneEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomTombstoneEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomTombstoneEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<RoomTopicEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<RoomTopicEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<RoomTopicEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<RoomTopicEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<SpaceChildEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<SpaceChildEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<SpaceChildEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<SpaceChildEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl From<SyncStateEvent<SpaceParentEventContent>> for AnySyncStateEvent
impl From<SyncStateEvent<SpaceParentEventContent>> for AnySyncStateEvent
sourcefn from(c: SyncStateEvent<SpaceParentEventContent>) -> AnySyncStateEvent
fn from(c: SyncStateEvent<SpaceParentEventContent>) -> AnySyncStateEvent
Converts to this type from the input type.
sourceimpl Redact for AnySyncStateEvent
impl Redact for AnySyncStateEvent
type Redacted = AnySyncStateEvent
type Redacted = AnySyncStateEvent
The redacted form of the event.
sourcefn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> AnySyncStateEvent
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> AnySyncStateEvent
Transforms
self
into a redacted form (removing most fields) according to the spec. Read moreAuto Trait Implementations
impl RefUnwindSafe for AnySyncStateEvent
impl Send for AnySyncStateEvent
impl Sync for AnySyncStateEvent
impl Unpin for AnySyncStateEvent
impl UnwindSafe for AnySyncStateEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more