pub type StrippedRoomMemberEvent = StrippedStateEvent<RoomMemberEventContent>;
Available on crate feature
events
only.Expand description
An m.room.member
event from an invited room preview.
Aliased Type§
struct StrippedRoomMemberEvent {
pub content: RoomMemberEventContent,
pub sender: OwnedUserId,
pub state_key: OwnedUserId,
}
Fields§
§content: RoomMemberEventContent
Data specific to the event type.
sender: OwnedUserId
The fully-qualified ID of the user who sent this event.
state_key: OwnedUserId
A unique key which defines the overwriting semantics for this piece of room state.
This is often an empty string, but some events send a UserId
to show which user the event
affects.
Implementations
Source§impl StrippedStateEvent<RoomMemberEventContent>
impl StrippedStateEvent<RoomMemberEventContent>
Sourcepub fn details(&self) -> MembershipDetails<'_>
Available on crate feature unstable-msc3489
only.
pub fn details(&self) -> MembershipDetails<'_>
unstable-msc3489
only.Obtain the details about this event that are required to calculate a membership change.
This is required when you want to calculate the change a redacted m.room.member
event
made.
Sourcepub fn membership_change<'a>(
&'a self,
prev_details: Option<MembershipDetails<'a>>,
) -> MembershipChange<'a>
Available on crate feature unstable-msc3489
only.
pub fn membership_change<'a>( &'a self, prev_details: Option<MembershipDetails<'a>>, ) -> MembershipChange<'a>
unstable-msc3489
only.Helper function for membership change.
Since stripped events don’t have unsigned.prev_content
, you have to pass the .details()
of the previous m.room.member
event manually (if there is a previous m.room.member
event).
Check the specification for details.
Trait Implementations
Source§impl<C> Clone for StrippedStateEvent<C>where
C: Clone + PossiblyRedactedStateEventContent,
<C as PossiblyRedactedStateEventContent>::StateKey: Clone,
impl<C> Clone for StrippedStateEvent<C>where
C: Clone + PossiblyRedactedStateEventContent,
<C as PossiblyRedactedStateEventContent>::StateKey: Clone,
Source§fn clone(&self) -> StrippedStateEvent<C>
fn clone(&self) -> StrippedStateEvent<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 moreSource§impl<C> Debug for StrippedStateEvent<C>where
C: Debug + PossiblyRedactedStateEventContent,
<C as PossiblyRedactedStateEventContent>::StateKey: Debug,
impl<C> Debug for StrippedStateEvent<C>where
C: Debug + PossiblyRedactedStateEventContent,
<C as PossiblyRedactedStateEventContent>::StateKey: Debug,
Source§impl<'de, C> Deserialize<'de> for StrippedStateEvent<C>
impl<'de, C> Deserialize<'de> for StrippedStateEvent<C>
Source§fn deserialize<D>(
deserializer: D,
) -> Result<StrippedStateEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<StrippedStateEvent<C>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more