Type Alias MinimalRoomMemberEvent

Source
pub type MinimalRoomMemberEvent = MinimalStateEvent<RoomMemberEventContent>;
Expand description

A minimal m.room.member event.

Aliased Type§

enum MinimalRoomMemberEvent {
    Original(OriginalMinimalStateEvent<RoomMemberEventContent>),
    Redacted(RedactedMinimalStateEvent<RedactedRoomMemberEventContent>),
}

Variants§

Implementations§

Source§

impl MinimalRoomMemberEvent

Source

pub fn membership(&self) -> &MembershipState

Obtain the membership state, regardless of whether this event is redacted.

Source§

impl<C> MinimalStateEvent<C>

Source

pub fn event_id(&self) -> Option<&EventId>

Get the inner event’s ID.

Source

pub fn as_original(&self) -> Option<&OriginalMinimalStateEvent<C>>

Returns the inner event, if it isn’t redacted.

Source

pub fn into_original(self) -> Option<OriginalMinimalStateEvent<C>>

Converts self to the inner OriginalMinimalStateEvent<C>, if it isn’t redacted.

Source

pub fn redact(&mut self, room_version: &RoomVersionId)
where C: Clone,

Redacts this event.

Does nothing if it is already redacted.

Trait Implementations

Source§

impl<C: Clone + StateEventContent + RedactContent> Clone for MinimalStateEvent<C>

Source§

fn clone(&self) -> MinimalStateEvent<C>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C: Debug + StateEventContent + RedactContent> Debug for MinimalStateEvent<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, C> Deserialize<'de> for MinimalStateEvent<C>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<C> From<&SyncStateEvent<C>> for MinimalStateEvent<C>

Source§

fn from(ev: &SyncStateEvent<C>) -> Self

Converts to this type from the input type.
Source§

impl<C> From<SyncStateEvent<C>> for MinimalStateEvent<C>

Source§

fn from(ev: SyncStateEvent<C>) -> Self

Converts to this type from the input type.
Source§

impl<C> Serialize for MinimalStateEvent<C>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more