ruma_events::space::child

Type Alias SyncSpaceChildEvent

Source
pub type SyncSpaceChildEvent = SyncStateEvent<SpaceChildEventContent>;
Expand description

An m.space.child event from a sync_events response.

Aliased Type§

enum SyncSpaceChildEvent {
    Original(OriginalSyncStateEvent<SpaceChildEventContent>),
    Redacted(RedactedSyncStateEvent<RedactedSpaceChildEventContent>),
}

Variants§

§

Original(OriginalSyncStateEvent<SpaceChildEventContent>)

Original, unredacted form of the event.

§

Redacted(RedactedSyncStateEvent<RedactedSpaceChildEventContent>)

Redacted form of the event with minimal fields.

Implementations

Source§

impl<C> SyncStateEvent<C>

Source

pub fn event_type(&self) -> StateEventType

Returns the type of this event.

Source

pub fn event_id(&self) -> &EventId

Returns this event’s event_id field.

Source

pub fn sender(&self) -> &UserId

Returns this event’s sender field.

Source

pub fn origin_server_ts(&self) -> MilliSecondsSinceUnixEpoch

Returns this event’s origin_server_ts field.

Source

pub fn state_key(&self) -> &C::StateKey

Returns this event’s state_key field.

Source

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

Get the inner OriginalSyncStateEvent if this is an unredacted event.

Source

pub fn into_full_event(self, room_id: OwnedRoomId) -> StateEvent<C>

Convert this sync event into a full event (one with a room_id field).

Trait Implementations

Source§

impl<C: Clone + StaticStateEventContent + RedactContent> Clone for SyncStateEvent<C>

Source§

fn clone(&self) -> SyncStateEvent<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 + StaticStateEventContent + RedactContent> Debug for SyncStateEvent<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 SyncStateEvent<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<StateEvent<C>> for SyncStateEvent<C>

Source§

fn from(full: StateEvent<C>) -> Self

Converts to this type from the input type.