Enum ruma_common::events::AnyStateEvent
source · [−]#[non_exhaustive]
pub enum AnyStateEvent {
Show 21 variants
PolicyRuleRoom(PolicyRuleRoomEvent),
PolicyRuleServer(PolicyRuleServerEvent),
PolicyRuleUser(PolicyRuleUserEvent),
RoomAliases(RoomAliasesEvent),
RoomAvatar(RoomAvatarEvent),
RoomCanonicalAlias(RoomCanonicalAliasEvent),
RoomCreate(RoomCreateEvent),
RoomEncryption(RoomEncryptionEvent),
RoomGuestAccess(RoomGuestAccessEvent),
RoomHistoryVisibility(RoomHistoryVisibilityEvent),
RoomJoinRules(RoomJoinRulesEvent),
RoomMember(RoomMemberEvent),
RoomName(RoomNameEvent),
RoomPinnedEvents(RoomPinnedEventsEvent),
RoomPowerLevels(RoomPowerLevelsEvent),
RoomServerAcl(RoomServerAclEvent),
RoomThirdPartyInvite(RoomThirdPartyInviteEvent),
RoomTombstone(RoomTombstoneEvent),
RoomTopic(RoomTopicEvent),
SpaceChild(SpaceChildEvent),
SpaceParent(SpaceParentEvent),
// some variants omitted
}
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
RoomGuestAccess(RoomGuestAccessEvent)
m.room.guest_access
RoomHistoryVisibility(RoomHistoryVisibilityEvent)
m.room.history_visibility
RoomJoinRules(RoomJoinRulesEvent)
m.room.join_rules
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
Implementations
sourceimpl 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 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
sourceimpl Clone for AnyStateEvent
impl Clone for AnyStateEvent
sourcefn clone(&self) -> AnyStateEvent
fn clone(&self) -> AnyStateEvent
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 more
sourceimpl Debug for AnyStateEvent
impl Debug for AnyStateEvent
sourceimpl<'de> Deserialize<'de> for AnyStateEvent
impl<'de> Deserialize<'de> for AnyStateEvent
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<AnyStateEvent> for AnySyncStateEvent
impl From<AnyStateEvent> for AnySyncStateEvent
sourcefn from(event: AnyStateEvent) -> Self
fn from(event: AnyStateEvent) -> Self
Converts to this type from the input type.
sourceimpl From<AnyStateEvent> for AnyRoomEvent
impl From<AnyStateEvent> for AnyRoomEvent
sourcefn from(c: AnyStateEvent) -> Self
fn from(c: AnyStateEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<PolicyRuleRoomEventContent>> for AnyStateEvent
impl From<StateEvent<PolicyRuleRoomEventContent>> for AnyStateEvent
sourcefn from(c: PolicyRuleRoomEvent) -> Self
fn from(c: PolicyRuleRoomEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<PolicyRuleServerEventContent>> for AnyStateEvent
impl From<StateEvent<PolicyRuleServerEventContent>> for AnyStateEvent
sourcefn from(c: PolicyRuleServerEvent) -> Self
fn from(c: PolicyRuleServerEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<PolicyRuleUserEventContent>> for AnyStateEvent
impl From<StateEvent<PolicyRuleUserEventContent>> for AnyStateEvent
sourcefn from(c: PolicyRuleUserEvent) -> Self
fn from(c: PolicyRuleUserEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomAliasesEventContent>> for AnyStateEvent
impl From<StateEvent<RoomAliasesEventContent>> for AnyStateEvent
sourcefn from(c: RoomAliasesEvent) -> Self
fn from(c: RoomAliasesEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomAvatarEventContent>> for AnyStateEvent
impl From<StateEvent<RoomAvatarEventContent>> for AnyStateEvent
sourcefn from(c: RoomAvatarEvent) -> Self
fn from(c: RoomAvatarEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomCanonicalAliasEventContent>> for AnyStateEvent
impl From<StateEvent<RoomCanonicalAliasEventContent>> for AnyStateEvent
sourcefn from(c: RoomCanonicalAliasEvent) -> Self
fn from(c: RoomCanonicalAliasEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomCreateEventContent>> for AnyStateEvent
impl From<StateEvent<RoomCreateEventContent>> for AnyStateEvent
sourcefn from(c: RoomCreateEvent) -> Self
fn from(c: RoomCreateEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomEncryptionEventContent>> for AnyStateEvent
impl From<StateEvent<RoomEncryptionEventContent>> for AnyStateEvent
sourcefn from(c: RoomEncryptionEvent) -> Self
fn from(c: RoomEncryptionEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomGuestAccessEventContent>> for AnyStateEvent
impl From<StateEvent<RoomGuestAccessEventContent>> for AnyStateEvent
sourcefn from(c: RoomGuestAccessEvent) -> Self
fn from(c: RoomGuestAccessEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomHistoryVisibilityEventContent>> for AnyStateEvent
impl From<StateEvent<RoomHistoryVisibilityEventContent>> for AnyStateEvent
sourcefn from(c: RoomHistoryVisibilityEvent) -> Self
fn from(c: RoomHistoryVisibilityEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomJoinRulesEventContent>> for AnyStateEvent
impl From<StateEvent<RoomJoinRulesEventContent>> for AnyStateEvent
sourcefn from(c: RoomJoinRulesEvent) -> Self
fn from(c: RoomJoinRulesEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomMemberEventContent>> for AnyStateEvent
impl From<StateEvent<RoomMemberEventContent>> for AnyStateEvent
sourcefn from(c: RoomMemberEvent) -> Self
fn from(c: RoomMemberEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomNameEventContent>> for AnyStateEvent
impl From<StateEvent<RoomNameEventContent>> for AnyStateEvent
sourcefn from(c: RoomNameEvent) -> Self
fn from(c: RoomNameEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomPinnedEventsEventContent>> for AnyStateEvent
impl From<StateEvent<RoomPinnedEventsEventContent>> for AnyStateEvent
sourcefn from(c: RoomPinnedEventsEvent) -> Self
fn from(c: RoomPinnedEventsEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomPowerLevelsEventContent>> for AnyStateEvent
impl From<StateEvent<RoomPowerLevelsEventContent>> for AnyStateEvent
sourcefn from(c: RoomPowerLevelsEvent) -> Self
fn from(c: RoomPowerLevelsEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomServerAclEventContent>> for AnyStateEvent
impl From<StateEvent<RoomServerAclEventContent>> for AnyStateEvent
sourcefn from(c: RoomServerAclEvent) -> Self
fn from(c: RoomServerAclEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomThirdPartyInviteEventContent>> for AnyStateEvent
impl From<StateEvent<RoomThirdPartyInviteEventContent>> for AnyStateEvent
sourcefn from(c: RoomThirdPartyInviteEvent) -> Self
fn from(c: RoomThirdPartyInviteEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomTombstoneEventContent>> for AnyStateEvent
impl From<StateEvent<RoomTombstoneEventContent>> for AnyStateEvent
sourcefn from(c: RoomTombstoneEvent) -> Self
fn from(c: RoomTombstoneEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<RoomTopicEventContent>> for AnyStateEvent
impl From<StateEvent<RoomTopicEventContent>> for AnyStateEvent
sourcefn from(c: RoomTopicEvent) -> Self
fn from(c: RoomTopicEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<SpaceChildEventContent>> for AnyStateEvent
impl From<StateEvent<SpaceChildEventContent>> for AnyStateEvent
sourcefn from(c: SpaceChildEvent) -> Self
fn from(c: SpaceChildEvent) -> Self
Converts to this type from the input type.
sourceimpl From<StateEvent<SpaceParentEventContent>> for AnyStateEvent
impl From<StateEvent<SpaceParentEventContent>> for AnyStateEvent
sourcefn from(c: SpaceParentEvent) -> Self
fn from(c: SpaceParentEvent) -> Self
Converts to this type from the input type.
sourceimpl Redact for AnyStateEvent
impl Redact for AnyStateEvent
type Redacted = AnyStateEvent
type Redacted = AnyStateEvent
The redacted form of the event.
sourcefn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self
Transforms self
into a redacted form (removing most fields) according to the spec. Read more
Auto Trait Implementations
impl RefUnwindSafe for AnyStateEvent
impl Send for AnyStateEvent
impl Sync for AnyStateEvent
impl Unpin for AnyStateEvent
impl UnwindSafe for AnyStateEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more