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,
}
events
only.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<'_>
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.
source§impl StrippedStateEvent<RoomPowerLevelsEventContent>
impl StrippedStateEvent<RoomPowerLevelsEventContent>
sourcepub fn power_levels(&self) -> RoomPowerLevels
Available on crate feature unstable-msc3489
only.
pub fn power_levels(&self) -> RoomPowerLevels
unstable-msc3489
only.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
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<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<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
source§impl From<StrippedStateEvent<RoomThirdPartyInviteEventContent>> for AnyStrippedStateEvent
impl From<StrippedStateEvent<RoomThirdPartyInviteEventContent>> for AnyStrippedStateEvent
source§fn from(
c: StrippedStateEvent<RoomThirdPartyInviteEventContent>,
) -> AnyStrippedStateEvent
fn from( c: StrippedStateEvent<RoomThirdPartyInviteEventContent>, ) -> 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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