Enum ruma::space::SpaceRoomJoinRule
source · pub enum SpaceRoomJoinRule {
Invite,
Knock,
Private,
Restricted,
KnockRestricted,
Public,
// some variants omitted
}
Expand description
The rule used for users wishing to join a room.
In contrast to the regular JoinRule
in ruma_events
, this enum does not hold the conditions
for joining restricted rooms. Instead, the server is assumed to only return rooms the user is
allowed to join in a space hierarchy listing response.
This type can hold an arbitrary string. To build this with a custom value, convert it from a
string with ::from()
/ .into()
. To check for values that are not available as a
documented variant here, use its string representation, obtained through
.as_str()
.
Variants§
Invite
A user who wishes to join the room must first receive an invite to the room from someone already inside of the room.
Knock
Users can join the room if they are invited, or they can request an invite to the room.
They can be allowed (invited) or denied (kicked/banned) access.
Private
Reserved but not yet implemented by the Matrix specification.
Restricted
Users can join the room if they are invited, or if they meet any of the conditions described in a set of allow rules.
These rules are not made available as part of a space hierarchy listing response and can only be seen by users inside the room.
KnockRestricted
Users can join the room if they are invited, or if they meet any of the conditions described in a set of allow rules, or they can request an invite to the room.
Public
Anyone can join the room without any prior action.
Implementations§
Trait Implementations§
source§impl AsRef<str> for SpaceRoomJoinRule
impl AsRef<str> for SpaceRoomJoinRule
source§impl Clone for SpaceRoomJoinRule
impl Clone for SpaceRoomJoinRule
source§fn clone(&self) -> SpaceRoomJoinRule
fn clone(&self) -> SpaceRoomJoinRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SpaceRoomJoinRule
impl Debug for SpaceRoomJoinRule
source§impl Default for SpaceRoomJoinRule
impl Default for SpaceRoomJoinRule
source§fn default() -> SpaceRoomJoinRule
fn default() -> SpaceRoomJoinRule
source§impl<'de> Deserialize<'de> for SpaceRoomJoinRule
impl<'de> Deserialize<'de> for SpaceRoomJoinRule
source§fn deserialize<D>(
deserializer: D,
) -> Result<SpaceRoomJoinRule, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SpaceRoomJoinRule, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
source§impl Display for SpaceRoomJoinRule
impl Display for SpaceRoomJoinRule
source§impl From<JoinRule> for SpaceRoomJoinRule
impl From<JoinRule> for SpaceRoomJoinRule
source§fn from(value: JoinRule) -> SpaceRoomJoinRule
fn from(value: JoinRule) -> SpaceRoomJoinRule
source§impl<T> From<T> for SpaceRoomJoinRule
impl<T> From<T> for SpaceRoomJoinRule
source§fn from(s: T) -> SpaceRoomJoinRule
fn from(s: T) -> SpaceRoomJoinRule
source§impl PartialEq for SpaceRoomJoinRule
impl PartialEq for SpaceRoomJoinRule
source§impl Serialize for SpaceRoomJoinRule
impl Serialize for SpaceRoomJoinRule
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,
impl Eq for SpaceRoomJoinRule
impl StructuralPartialEq for SpaceRoomJoinRule
Auto Trait Implementations§
impl Freeze for SpaceRoomJoinRule
impl RefUnwindSafe for SpaceRoomJoinRule
impl Send for SpaceRoomJoinRule
impl Sync for SpaceRoomJoinRule
impl Unpin for SpaceRoomJoinRule
impl UnwindSafe for SpaceRoomJoinRule
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
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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