Struct ruma_events::room::create::RoomCreateEventContent
source · 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§
§creator: Option<OwnedUserId>
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
sourcepub fn new_v1(creator: OwnedUserId) -> Self
pub fn new_v1(creator: OwnedUserId) -> Self
Creates a new RoomCreateEventContent
with the given creator, as required for room versions
1 through 10.
sourcepub fn new_v11() -> Self
pub fn new_v11() -> Self
Creates a new RoomCreateEventContent
with the default values and no creator, as introduced
in room version 11.
The room version is set to RoomVersionId::V11
.
Trait Implementations§
source§impl Clone for RoomCreateEventContent
impl Clone for RoomCreateEventContent
source§fn clone(&self) -> RoomCreateEventContent
fn clone(&self) -> RoomCreateEventContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
source§impl EventContent for RoomCreateEventContent
impl EventContent for RoomCreateEventContent
source§type EventType = StateEventType
type EventType = StateEventType
source§fn event_type(&self) -> Self::EventType
fn event_type(&self) -> Self::EventType
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
source§impl PossiblyRedactedStateEventContent for RoomCreateEventContent
impl PossiblyRedactedStateEventContent for RoomCreateEventContent
source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
state_key
field.source§impl RedactContent for RoomCreateEventContent
impl RedactContent for RoomCreateEventContent
source§type Redacted = RoomCreateEventContent
type Redacted = RoomCreateEventContent
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
state_key
field.source§impl StaticStateEventContent for RoomCreateEventContent
impl StaticStateEventContent for RoomCreateEventContent
source§type PossiblyRedacted = RoomCreateEventContent
type PossiblyRedacted = RoomCreateEventContent
source§type Unsigned = StateUnsigned<<RoomCreateEventContent as StaticStateEventContent>::PossiblyRedacted>
type Unsigned = StateUnsigned<<RoomCreateEventContent as StaticStateEventContent>::PossiblyRedacted>
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
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
)