Enum ruma_common::space::SpaceRoomJoinRule
source · #[non_exhaustive]pub enum SpaceRoomJoinRule {
Invite,
Knock,
Private,
Restricted,
KnockRestricted,
Public,
}
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 (Non-exhaustive)§
This enum is marked as non-exhaustive
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<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<T> From<T> for SpaceRoomJoinRule
impl<T> From<T> for SpaceRoomJoinRule
source§impl PartialEq for SpaceRoomJoinRule
impl PartialEq 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 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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.