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<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§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§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.