Struct matrix_sdk::ruma::events::space::parent::SpaceParentEventContent
source · #[non_exhaustive]pub struct SpaceParentEventContent {
pub via: Vec<OwnedServerName>,
pub canonical: bool,
}
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: bool
Determines 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 EventContent for SpaceParentEventContent
impl EventContent for SpaceParentEventContent
§type EventType = StateEventType
type EventType = StateEventType
source§fn event_type(&self) -> <SpaceParentEventContent as EventContent>::EventType
fn event_type(&self) -> <SpaceParentEventContent as EventContent>::EventType
m.room.message
.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
§type Redacted = RedactedSpaceParentEventContent
type Redacted = RedactedSpaceParentEventContent
source§fn redact(self, version: &RoomVersionId) -> RedactedSpaceParentEventContent
fn redact(self, version: &RoomVersionId) -> 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
§type StateKey = OwnedRoomId
type StateKey = OwnedRoomId
state_key
field.source§impl StaticStateEventContent for SpaceParentEventContent
impl StaticStateEventContent for SpaceParentEventContent
§type PossiblyRedacted = PossiblyRedactedSpaceParentEventContent
type PossiblyRedacted = PossiblyRedactedSpaceParentEventContent
§type Unsigned = StateUnsigned<<SpaceParentEventContent as StaticStateEventContent>::PossiblyRedacted>
type Unsigned = StateUnsigned<<SpaceParentEventContent as StaticStateEventContent>::PossiblyRedacted>
unsigned
field.Auto Trait Implementations§
impl Freeze for SpaceParentEventContent
impl RefUnwindSafe for SpaceParentEventContent
impl Send for SpaceParentEventContent
impl Sync for SpaceParentEventContent
impl Unpin for SpaceParentEventContent
impl UnwindSafe for SpaceParentEventContent
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CompatExt for T
impl<T> CompatExt for T
source§impl<T> EventContentFromType for Twhere
T: EventContent + DeserializeOwned,
impl<T> EventContentFromType for Twhere
T: EventContent + DeserializeOwned,
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more