pub type MemberEvent = SyncOrStrippedState<RoomMemberEventContent>;
Expand description
Wrapper around both MemberEvent-Types
Aliased Type§
enum MemberEvent {
Sync(SyncStateEvent<RoomMemberEventContent>),
Stripped(StrippedStateEvent<RoomMemberEventContent>),
}
Variants§
Sync(SyncStateEvent<RoomMemberEventContent>)
An event from a room in joined or left state.
Stripped(StrippedStateEvent<RoomMemberEventContent>)
An event from a room in invited state.
Implementations
Source§impl<C> SyncOrStrippedState<C>where
C: RedactContent + StaticStateEventContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + Debug + Clone,
<C as StaticStateEventContent>::PossiblyRedacted: PossiblyRedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey>,
impl<C> SyncOrStrippedState<C>where
C: RedactContent + StaticStateEventContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + Debug + Clone,
<C as StaticStateEventContent>::PossiblyRedacted: PossiblyRedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey>,
Sourcepub fn as_sync(&self) -> Option<&SyncStateEvent<C>>
pub fn as_sync(&self) -> Option<&SyncStateEvent<C>>
If this is a SyncStateEvent
, return a reference to the inner event.
Sourcepub fn as_stripped(
&self,
) -> Option<&StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>
pub fn as_stripped( &self, ) -> Option<&StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>
If this is a StrippedStateEvent
, return a reference to the inner
event.
Sourcepub fn origin_server_ts(&self) -> Option<MilliSecondsSinceUnixEpoch>
pub fn origin_server_ts(&self) -> Option<MilliSecondsSinceUnixEpoch>
The server timestamp of this event.
Sourcepub fn state_key(&self) -> &<C as StateEventContent>::StateKey
pub fn state_key(&self) -> &<C as StateEventContent>::StateKey
The state key associated to this state event.
Source§impl<C> SyncOrStrippedState<C>where
C: RedactContent + PossiblyRedactedStateEventContent + StaticStateEventContent<PossiblyRedacted = C>,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + Debug + Clone,
impl<C> SyncOrStrippedState<C>where
C: RedactContent + PossiblyRedactedStateEventContent + StaticStateEventContent<PossiblyRedacted = C>,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + Debug + Clone,
Sourcepub fn original_content(&self) -> Option<&C>
pub fn original_content(&self) -> Option<&C>
The inner content of the wrapped event.
Source§impl SyncOrStrippedState<RoomMemberEventContent>
impl SyncOrStrippedState<RoomMemberEventContent>
Sourcepub fn membership(&self) -> &MembershipState
pub fn membership(&self) -> &MembershipState
The membership state of the user.
Sourcepub fn display_name(&self) -> DisplayName
pub fn display_name(&self) -> DisplayName
The name that should be displayed for this member event.
It there is no displayname
in the event’s content, the localpart or
the user ID is returned.
Trait Implementations
Source§impl<C> Clone for SyncOrStrippedState<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Debug + Clone,
<C as StaticStateEventContent>::PossiblyRedacted: Clone,
impl<C> Clone for SyncOrStrippedState<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Debug + Clone,
<C as StaticStateEventContent>::PossiblyRedacted: Clone,
Source§fn clone(&self) -> SyncOrStrippedState<C>
fn clone(&self) -> SyncOrStrippedState<C>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more