#[non_exhaustive]pub struct SpaceParentEventContent {
    pub via: Vec<OwnedServerName>,
    pub canonical: bool,
}events only.Expand description
The content of an m.space.parent event.
Rooms can claim parents via the m.space.parent state event.
Similar to m.space.child, the state_key is the ID of the parent space, and the content must
contain a via key which gives a list of candidate servers that can be used to join the
parent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.via: Vec<OwnedServerName>List of candidate servers that can be used to join the room.
canonical: boolDetermines whether this is the main parent for the space.
When a user joins a room with a canonical parent, clients may switch to view the room in
the context of that space, peeking into it in order to find other rooms and group them
together. In practice, well behaved rooms should only have one canonical parent, but
given this is not enforced: if multiple are present the client should select the one with
the lowest room ID, as determined via a lexicographic ordering of the Unicode code-points.
Defaults to false.
Implementations§
Source§impl SpaceParentEventContent
 
impl SpaceParentEventContent
Sourcepub fn new(via: Vec<OwnedServerName>) -> SpaceParentEventContent
 
pub fn new(via: Vec<OwnedServerName>) -> SpaceParentEventContent
Creates a new SpaceParentEventContent with the given routing servers.
Trait Implementations§
Source§impl Clone for SpaceParentEventContent
 
impl Clone for SpaceParentEventContent
Source§fn clone(&self) -> SpaceParentEventContent
 
fn clone(&self) -> SpaceParentEventContent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpaceParentEventContent
 
impl Debug for SpaceParentEventContent
Source§impl<'de> Deserialize<'de> for SpaceParentEventContent
 
impl<'de> Deserialize<'de> for SpaceParentEventContent
Source§fn deserialize<__D>(
    __deserializer: __D,
) -> Result<SpaceParentEventContent, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(
    __deserializer: __D,
) -> Result<SpaceParentEventContent, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
Source§impl From<SpaceParentEventContent> for AnyStateEventContent
 
impl From<SpaceParentEventContent> for AnyStateEventContent
Source§fn from(c: SpaceParentEventContent) -> AnyStateEventContent
 
fn from(c: SpaceParentEventContent) -> AnyStateEventContent
Source§impl RedactContent for SpaceParentEventContent
 
impl RedactContent for SpaceParentEventContent
Source§type Redacted = RedactedSpaceParentEventContent
 
type Redacted = RedactedSpaceParentEventContent
Source§fn redact(self, _rules: &RedactionRules) -> RedactedSpaceParentEventContent
 
fn redact(self, _rules: &RedactionRules) -> RedactedSpaceParentEventContent
self into a redacted form (removing most or all fields) according to the spec. Read moreSource§impl Serialize for SpaceParentEventContent
 
impl Serialize for SpaceParentEventContent
Source§fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
 
fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
Source§impl StateEventContent for SpaceParentEventContent
 
impl StateEventContent for SpaceParentEventContent
Source§type StateKey = OwnedRoomId
 
type StateKey = OwnedRoomId
state_key field.Source§fn event_type(&self) -> StateEventType
 
fn event_type(&self) -> StateEventType
m.room.name.Source§impl StaticStateEventContent for SpaceParentEventContent
 
impl StaticStateEventContent for SpaceParentEventContent
Source§type PossiblyRedacted = PossiblyRedactedSpaceParentEventContent
 
type PossiblyRedacted = PossiblyRedactedSpaceParentEventContent
Source§type Unsigned = StateUnsigned<<SpaceParentEventContent as StaticStateEventContent>::PossiblyRedacted>
 
type Unsigned = StateUnsigned<<SpaceParentEventContent as StaticStateEventContent>::PossiblyRedacted>
unsigned field.