Struct ruma::events::StrippedStateEvent
source · pub struct StrippedStateEvent<C>where
C: PossiblyRedactedStateEventContent,{
pub content: C,
pub sender: OwnedUserId,
pub state_key: <C as PossiblyRedactedStateEventContent>::StateKey,
}
Expand description
A stripped-down state event, used for previews of rooms the user has been invited to.
Fields§
§content: C
Data specific to the event type.
sender: OwnedUserId
The fully-qualified ID of the user who sent this event.
state_key: <C as PossiblyRedactedStateEventContent>::StateKey
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<'_>
pub fn details(&self) -> MembershipDetails<'_>
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>
pub fn membership_change<'a>( &'a self, prev_details: Option<MembershipDetails<'a>>, ) -> MembershipChange<'a>
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.
source§impl StrippedStateEvent<RoomPowerLevelsEventContent>
impl StrippedStateEvent<RoomPowerLevelsEventContent>
sourcepub fn power_levels(&self) -> RoomPowerLevels
pub fn power_levels(&self) -> RoomPowerLevels
Obtain the effective power levels from this event.
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>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
source§impl From<StrippedStateEvent<CallMemberEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<CallMemberEventContent>> for AnyStrippedStateEvent
source§fn from(c: StrippedStateEvent<CallMemberEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<CallMemberEventContent>) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomNameEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomNameEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedSpaceChildEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedSpaceChildEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedSpaceChildEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedSpaceChildEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<PossiblyRedactedSpaceParentEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedSpaceParentEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<PossiblyRedactedSpaceParentEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedSpaceParentEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomAvatarEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomAvatarEventContent>> for AnyStrippedStateEvent
source§fn from(c: StrippedStateEvent<RoomAvatarEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<RoomAvatarEventContent>) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomCanonicalAliasEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomCanonicalAliasEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<RoomCanonicalAliasEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomCanonicalAliasEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomCreateEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomCreateEventContent>> for AnyStrippedStateEvent
source§fn from(c: StrippedStateEvent<RoomCreateEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<RoomCreateEventContent>) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomHistoryVisibilityEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomHistoryVisibilityEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<RoomHistoryVisibilityEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomHistoryVisibilityEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomJoinRulesEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomJoinRulesEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<RoomJoinRulesEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomJoinRulesEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomMemberEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomMemberEventContent>> for AnyStrippedStateEvent
source§fn from(c: StrippedStateEvent<RoomMemberEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<RoomMemberEventContent>) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomPowerLevelsEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomPowerLevelsEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<RoomPowerLevelsEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomPowerLevelsEventContent>, ) -> AnyStrippedStateEvent
source§impl From<StrippedStateEvent<RoomServerAclEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomServerAclEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<RoomServerAclEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomServerAclEventContent>, ) -> AnyStrippedStateEvent
Auto Trait Implementations§
impl<C> Freeze for StrippedStateEvent<C>
impl<C> RefUnwindSafe for StrippedStateEvent<C>
impl<C> Send for StrippedStateEvent<C>
impl<C> Sync for StrippedStateEvent<C>
impl<C> Unpin for StrippedStateEvent<C>
impl<C> UnwindSafe for StrippedStateEvent<C>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)