Struct matrix_sdk::ruma::events::StrippedStateEvent
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§
§impl StrippedStateEvent<RoomMemberEventContent>
impl StrippedStateEvent<RoomMemberEventContent>
pub fn details(&self) -> MembershipDetails<'_>
Available on crate feature unstable-msc3401
only.
pub fn details(&self) -> MembershipDetails<'_>
unstable-msc3401
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.
pub fn membership_change<'a>(
&'a self,
prev_details: Option<MembershipDetails<'a>>
) -> MembershipChange<'a>
Available on crate feature unstable-msc3401
only.
pub fn membership_change<'a>( &'a self, prev_details: Option<MembershipDetails<'a>> ) -> MembershipChange<'a>
unstable-msc3401
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.
§impl StrippedStateEvent<RoomPowerLevelsEventContent>
impl StrippedStateEvent<RoomPowerLevelsEventContent>
pub fn power_levels(&self) -> RoomPowerLevels
Available on crate feature unstable-msc3401
only.
pub fn power_levels(&self) -> RoomPowerLevels
unstable-msc3401
only.Obtain the effective power levels from this event.
Trait Implementations§
§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,
§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 more§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,
§impl<'de, C> Deserialize<'de> for StrippedStateEvent<C>
impl<'de, C> Deserialize<'de> for StrippedStateEvent<C>
§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<PossiblyRedactedRoomGuestAccessEventContent>> for MinimalStateEvent<RoomGuestAccessEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>> for MinimalStateEvent<RoomGuestAccessEventContent>
source§fn from(
event: &StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>
) -> MinimalStateEvent<RoomGuestAccessEventContent>
fn from( event: &StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent> ) -> MinimalStateEvent<RoomGuestAccessEventContent>
source§impl From<&StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for MinimalStateEvent<RoomNameEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for MinimalStateEvent<RoomNameEventContent>
source§fn from(
event: &StrippedStateEvent<PossiblyRedactedRoomNameEventContent>
) -> MinimalStateEvent<RoomNameEventContent>
fn from( event: &StrippedStateEvent<PossiblyRedactedRoomNameEventContent> ) -> MinimalStateEvent<RoomNameEventContent>
source§impl From<&StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for MinimalStateEvent<RoomTombstoneEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for MinimalStateEvent<RoomTombstoneEventContent>
source§fn from(
event: &StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>
) -> MinimalStateEvent<RoomTombstoneEventContent>
fn from( event: &StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent> ) -> MinimalStateEvent<RoomTombstoneEventContent>
source§impl From<&StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for MinimalStateEvent<RoomTopicEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for MinimalStateEvent<RoomTopicEventContent>
source§fn from(
event: &StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>
) -> MinimalStateEvent<RoomTopicEventContent>
fn from( event: &StrippedStateEvent<PossiblyRedactedRoomTopicEventContent> ) -> MinimalStateEvent<RoomTopicEventContent>
source§impl From<&StrippedStateEvent<RoomAvatarEventContent>> for MinimalStateEvent<RoomAvatarEventContent>
impl From<&StrippedStateEvent<RoomAvatarEventContent>> for MinimalStateEvent<RoomAvatarEventContent>
source§fn from(
event: &StrippedStateEvent<RoomAvatarEventContent>
) -> MinimalStateEvent<RoomAvatarEventContent>
fn from( event: &StrippedStateEvent<RoomAvatarEventContent> ) -> MinimalStateEvent<RoomAvatarEventContent>
source§impl From<&StrippedStateEvent<RoomCanonicalAliasEventContent>> for MinimalStateEvent<RoomCanonicalAliasEventContent>
impl From<&StrippedStateEvent<RoomCanonicalAliasEventContent>> for MinimalStateEvent<RoomCanonicalAliasEventContent>
source§fn from(
event: &StrippedStateEvent<RoomCanonicalAliasEventContent>
) -> MinimalStateEvent<RoomCanonicalAliasEventContent>
fn from( event: &StrippedStateEvent<RoomCanonicalAliasEventContent> ) -> MinimalStateEvent<RoomCanonicalAliasEventContent>
source§impl From<&StrippedStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
impl From<&StrippedStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
source§fn from(
event: &StrippedStateEvent<RoomCreateEventContent>
) -> MinimalStateEvent<RoomCreateWithCreatorEventContent>
fn from( event: &StrippedStateEvent<RoomCreateEventContent> ) -> MinimalStateEvent<RoomCreateWithCreatorEventContent>
source§impl From<&StrippedStateEvent<RoomHistoryVisibilityEventContent>> for MinimalStateEvent<RoomHistoryVisibilityEventContent>
impl From<&StrippedStateEvent<RoomHistoryVisibilityEventContent>> for MinimalStateEvent<RoomHistoryVisibilityEventContent>
source§fn from(
event: &StrippedStateEvent<RoomHistoryVisibilityEventContent>
) -> MinimalStateEvent<RoomHistoryVisibilityEventContent>
fn from( event: &StrippedStateEvent<RoomHistoryVisibilityEventContent> ) -> MinimalStateEvent<RoomHistoryVisibilityEventContent>
source§impl From<&StrippedStateEvent<RoomJoinRulesEventContent>> for MinimalStateEvent<RoomJoinRulesEventContent>
impl From<&StrippedStateEvent<RoomJoinRulesEventContent>> for MinimalStateEvent<RoomJoinRulesEventContent>
source§fn from(
event: &StrippedStateEvent<RoomJoinRulesEventContent>
) -> MinimalStateEvent<RoomJoinRulesEventContent>
fn from( event: &StrippedStateEvent<RoomJoinRulesEventContent> ) -> MinimalStateEvent<RoomJoinRulesEventContent>
§impl From<StrippedStateEvent<PossiblyRedactedCallMemberEventContent>> for AnyStrippedStateEvent
Available on crate feature unstable-msc3401
only.
impl From<StrippedStateEvent<PossiblyRedactedCallMemberEventContent>> for AnyStrippedStateEvent
unstable-msc3401
only.§fn from(
c: StrippedStateEvent<PossiblyRedactedCallMemberEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedCallMemberEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedPolicyRuleRoomEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedPolicyRuleServerEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedPolicyRuleUserEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomAliasesEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomEncryptionEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomNameEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomNameEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomPinnedEventsEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomThirdPartyInviteEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedRoomTopicEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedSpaceChildEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedSpaceChildEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedSpaceChildEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedSpaceChildEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<PossiblyRedactedSpaceParentEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<PossiblyRedactedSpaceParentEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<PossiblyRedactedSpaceParentEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedSpaceParentEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomAvatarEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomAvatarEventContent>> for AnyStrippedStateEvent
§fn from(c: StrippedStateEvent<RoomAvatarEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<RoomAvatarEventContent>) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomCanonicalAliasEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomCanonicalAliasEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<RoomCanonicalAliasEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomCanonicalAliasEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomCreateEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomCreateEventContent>> for AnyStrippedStateEvent
§fn from(c: StrippedStateEvent<RoomCreateEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<RoomCreateEventContent>) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomHistoryVisibilityEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomHistoryVisibilityEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<RoomHistoryVisibilityEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomHistoryVisibilityEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomJoinRulesEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomJoinRulesEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<RoomJoinRulesEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomJoinRulesEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomMemberEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomMemberEventContent>> for AnyStrippedStateEvent
§fn from(c: StrippedStateEvent<RoomMemberEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<RoomMemberEventContent>) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomPowerLevelsEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomPowerLevelsEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<RoomPowerLevelsEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomPowerLevelsEventContent> ) -> AnyStrippedStateEvent
§impl From<StrippedStateEvent<RoomServerAclEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomServerAclEventContent>> for AnyStrippedStateEvent
§fn from(
c: StrippedStateEvent<RoomServerAclEventContent>
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomServerAclEventContent> ) -> AnyStrippedStateEvent
impl<C> SyncEvent for StrippedStateEvent<C>where
C: StaticEventContent + PossiblyRedactedStateEventContent,
Auto Trait Implementations§
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>