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<PossiblyRedactedRoomGuestAccessEventContent>> for MinimalStateEvent<RoomGuestAccessEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomGuestAccessEventContent>> for MinimalStateEvent<RoomGuestAccessEventContent>
Source§fn from(event: &StrippedRoomGuestAccessEvent) -> Self
fn from(event: &StrippedRoomGuestAccessEvent) -> Self
Source§impl From<&StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for MinimalStateEvent<RoomNameEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomNameEventContent>> for MinimalStateEvent<RoomNameEventContent>
Source§fn from(event: &StrippedRoomNameEvent) -> Self
fn from(event: &StrippedRoomNameEvent) -> Self
Source§impl From<&StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for MinimalStateEvent<RoomTombstoneEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomTombstoneEventContent>> for MinimalStateEvent<RoomTombstoneEventContent>
Source§fn from(event: &StrippedRoomTombstoneEvent) -> Self
fn from(event: &StrippedRoomTombstoneEvent) -> Self
Source§impl From<&StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for MinimalStateEvent<RoomTopicEventContent>
impl From<&StrippedStateEvent<PossiblyRedactedRoomTopicEventContent>> for MinimalStateEvent<RoomTopicEventContent>
Source§fn from(event: &StrippedRoomTopicEvent) -> Self
fn from(event: &StrippedRoomTopicEvent) -> Self
Source§impl From<&StrippedStateEvent<RoomAvatarEventContent>> for MinimalStateEvent<RoomAvatarEventContent>
impl From<&StrippedStateEvent<RoomAvatarEventContent>> for MinimalStateEvent<RoomAvatarEventContent>
Source§fn from(event: &StrippedRoomAvatarEvent) -> Self
fn from(event: &StrippedRoomAvatarEvent) -> Self
Source§impl From<&StrippedStateEvent<RoomCanonicalAliasEventContent>> for MinimalStateEvent<RoomCanonicalAliasEventContent>
impl From<&StrippedStateEvent<RoomCanonicalAliasEventContent>> for MinimalStateEvent<RoomCanonicalAliasEventContent>
Source§fn from(event: &StrippedRoomCanonicalAliasEvent) -> Self
fn from(event: &StrippedRoomCanonicalAliasEvent) -> Self
Source§impl From<&StrippedStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
impl From<&StrippedStateEvent<RoomCreateEventContent>> for MinimalStateEvent<RoomCreateWithCreatorEventContent>
Source§fn from(event: &StrippedRoomCreateEvent) -> Self
fn from(event: &StrippedRoomCreateEvent) -> Self
Source§impl From<&StrippedStateEvent<RoomHistoryVisibilityEventContent>> for MinimalStateEvent<RoomHistoryVisibilityEventContent>
impl From<&StrippedStateEvent<RoomHistoryVisibilityEventContent>> for MinimalStateEvent<RoomHistoryVisibilityEventContent>
Source§fn from(event: &StrippedRoomHistoryVisibilityEvent) -> Self
fn from(event: &StrippedRoomHistoryVisibilityEvent) -> Self
Source§impl From<&StrippedStateEvent<RoomJoinRulesEventContent>> for MinimalStateEvent<RoomJoinRulesEventContent>
impl From<&StrippedStateEvent<RoomJoinRulesEventContent>> for MinimalStateEvent<RoomJoinRulesEventContent>
Source§fn from(event: &StrippedRoomJoinRulesEvent) -> Self
fn from(event: &StrippedRoomJoinRulesEvent) -> Self
Source§impl From<StrippedStateEvent<CallMemberEventContent>> for AnyStrippedStateEvent
Available on crate feature unstable-msc3401
only.
impl From<StrippedStateEvent<CallMemberEventContent>> for AnyStrippedStateEvent
unstable-msc3401
only.Source§fn from(c: StrippedStateEvent<CallMemberEventContent>) -> AnyStrippedStateEvent
fn from(c: StrippedStateEvent<CallMemberEventContent>) -> AnyStrippedStateEvent
Source§impl From<StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>> for AnyStrippedStateEvent
Available on crate feature unstable-msc3489
only.
impl From<StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>> for AnyStrippedStateEvent
unstable-msc3489
only.Source§fn from(
c: StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedBeaconInfoEventContent>, ) -> AnyStrippedStateEvent
Source§impl From<StrippedStateEvent<PossiblyRedactedMemberHintsEventContent>> for AnyStrippedStateEvent
Available on crate feature unstable-msc4171
only.
impl From<StrippedStateEvent<PossiblyRedactedMemberHintsEventContent>> for AnyStrippedStateEvent
unstable-msc4171
only.Source§fn from(
c: StrippedStateEvent<PossiblyRedactedMemberHintsEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<PossiblyRedactedMemberHintsEventContent>, ) -> 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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more