Struct ruma::api::client::r0::room::create_room::CreationContent [−][src]
pub struct CreationContent {
pub federate: bool,
pub predecessor: Option<PreviousRoom>,
pub room_type: Option<RoomType>,
}
api
and (crate features client-api
or client-api-c
or client-api-s
) only.Expand description
Extra options to be added to the m.room.create
event.
This is the same as the event content struct for m.room.create
, but without some fields that
servers are supposed to ignore.
Fields
federate: bool
Whether users on other servers can join this room.
Defaults to true
if key does not exist.
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
Creates a new CreationContent
with all fields defaulted.
pub fn into_event_content(
self,
creator: UserId,
room_version: RoomVersionId
) -> CreateEventContent
pub fn into_event_content(
self,
creator: UserId,
room_version: RoomVersionId
) -> CreateEventContent
Given a CreationContent
and the other fields that a homeserver has to fill, construct
a CreateEventContent
.
Trait Implementations
Returns the “default value” for a type. Read more
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<CreationContent, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<CreationContent, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for CreationContent
impl Send for CreationContent
impl Sync for CreationContent
impl Unpin for CreationContent
impl UnwindSafe for CreationContent
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more