#[non_exhaustive]pub struct RoomCreateEventContent {
pub creator: Option<OwnedUserId>,
pub federate: bool,
pub room_version: RoomVersionId,
pub predecessor: Option<PreviousRoom>,
pub room_type: Option<RoomType>,
}
Expand description
The content of an m.room.create
event.
This is the first event in a room and cannot be changed.
It acts as the root of all other events.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.creator: Option<OwnedUserId>
👎Deprecated: Since Matrix 1.8. This field was removed in Room version 11, clients should use the event’s sender instead
The user_id
of the room creator.
This is set by the homeserver.
This is required in room versions 1 trough 10, but is removed starting from room version 11.
federate: bool
Whether or not this room’s data should be transferred to other homeservers.
room_version: RoomVersionId
The version of the room.
Defaults to RoomVersionId::V1
.
predecessor: Option<PreviousRoom>
A reference to the room this room replaces, if the previous room was upgraded.
room_type: Option<RoomType>
The room type.
This is currently only used for spaces.
Implementations§
Source§impl RoomCreateEventContent
impl RoomCreateEventContent
Trait Implementations§
Source§impl Clone for RoomCreateEventContent
impl Clone for RoomCreateEventContent
Source§fn clone(&self) -> RoomCreateEventContent
fn clone(&self) -> RoomCreateEventContent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RoomCreateEventContent
impl Debug for RoomCreateEventContent
Source§impl<'de> Deserialize<'de> for RoomCreateEventContent
impl<'de> Deserialize<'de> for RoomCreateEventContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 EventContent for RoomCreateEventContent
impl EventContent for RoomCreateEventContent
Source§type EventType = StateEventType
type EventType = StateEventType
The Rust enum for the event kind’s known types.
Source§fn event_type(&self) -> Self::EventType
fn event_type(&self) -> Self::EventType
Get the event’s type, like
m.room.message
.Source§impl From<RoomCreateEventContent> for AnyStateEventContent
impl From<RoomCreateEventContent> for AnyStateEventContent
Source§fn from(c: RoomCreateEventContent) -> Self
fn from(c: RoomCreateEventContent) -> Self
Converts to this type from the input type.
Source§impl PossiblyRedactedStateEventContent for RoomCreateEventContent
impl PossiblyRedactedStateEventContent for RoomCreateEventContent
Source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
The type of the event’s
state_key
field.Source§impl Serialize for RoomCreateEventContent
impl Serialize for RoomCreateEventContent
Source§impl StateEventContent for RoomCreateEventContent
impl StateEventContent for RoomCreateEventContent
Source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
The type of the event’s
state_key
field.Source§impl StaticStateEventContent for RoomCreateEventContent
impl StaticStateEventContent for RoomCreateEventContent
Source§type PossiblyRedacted = RoomCreateEventContent
type PossiblyRedacted = RoomCreateEventContent
The possibly redacted form of the event’s content.
Source§type Unsigned = StateUnsigned<<RoomCreateEventContent as StaticStateEventContent>::PossiblyRedacted>
type Unsigned = StateUnsigned<<RoomCreateEventContent as StaticStateEventContent>::PossiblyRedacted>
The type of the event’s
unsigned
field.Auto Trait Implementations§
impl Freeze for RoomCreateEventContent
impl RefUnwindSafe for RoomCreateEventContent
impl Send for RoomCreateEventContent
impl Sync for RoomCreateEventContent
impl Unpin for RoomCreateEventContent
impl UnwindSafe for RoomCreateEventContent
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
Mutably borrows from an owned value. Read more