Enum ruma_client_api::space::SpaceRoomJoinRule
source · pub enum SpaceRoomJoinRule {
Invite,
Knock,
Private,
Restricted,
KnockRestricted,
Public,
// some variants omitted
}
client
or server
only.Expand description
The rule used for users wishing to join a room.
In contrast to the regular JoinRule
, 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 AllowRule
s.
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 AllowRule
s, 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<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
source§impl Display for SpaceRoomJoinRule
impl Display for SpaceRoomJoinRule
source§impl PartialEq<SpaceRoomJoinRule> for SpaceRoomJoinRule
impl PartialEq<SpaceRoomJoinRule> for SpaceRoomJoinRule
source§fn eq(&self, other: &SpaceRoomJoinRule) -> bool
fn eq(&self, other: &SpaceRoomJoinRule) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SpaceRoomJoinRule
impl Serialize for SpaceRoomJoinRule
impl Eq for SpaceRoomJoinRule
impl StructuralEq for SpaceRoomJoinRule
impl StructuralPartialEq for SpaceRoomJoinRule
Auto Trait Implementations§
impl RefUnwindSafe for SpaceRoomJoinRule
impl Send for SpaceRoomJoinRule
impl Sync for SpaceRoomJoinRule
impl Unpin for SpaceRoomJoinRule
impl UnwindSafe for SpaceRoomJoinRule
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.