pub enum SpaceRoomJoinRule {
Invite,
Knock,
Private,
Restricted,
KnockRestricted,
Public,
// some variants omitted
}
client-api-c
or client-api-s
) and (crate features client
or server
) and crate feature api
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
sourceimpl AsRef<str> for SpaceRoomJoinRule
impl AsRef<str> for SpaceRoomJoinRule
sourceimpl Clone for SpaceRoomJoinRule
impl Clone for SpaceRoomJoinRule
sourcefn clone(&self) -> SpaceRoomJoinRule
fn clone(&self) -> SpaceRoomJoinRule
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for SpaceRoomJoinRule
impl Debug for SpaceRoomJoinRule
sourceimpl Default for SpaceRoomJoinRule
impl Default for SpaceRoomJoinRule
sourcefn default() -> SpaceRoomJoinRule
fn default() -> SpaceRoomJoinRule
sourceimpl<'de> Deserialize<'de> for SpaceRoomJoinRule
impl<'de> Deserialize<'de> for SpaceRoomJoinRule
sourcefn 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>,
sourceimpl Display for SpaceRoomJoinRule
impl Display for SpaceRoomJoinRule
sourceimpl<T> From<T> for SpaceRoomJoinRulewhere
T: AsRef<str> + Into<Box<str, Global>>,
impl<T> From<T> for SpaceRoomJoinRulewhere
T: AsRef<str> + Into<Box<str, Global>>,
sourcefn from(s: T) -> SpaceRoomJoinRule
fn from(s: T) -> SpaceRoomJoinRule
sourceimpl PartialEq<SpaceRoomJoinRule> for SpaceRoomJoinRule
impl PartialEq<SpaceRoomJoinRule> for SpaceRoomJoinRule
sourcefn eq(&self, other: &SpaceRoomJoinRule) -> bool
fn eq(&self, other: &SpaceRoomJoinRule) -> bool
sourceimpl Serialize for SpaceRoomJoinRule
impl Serialize for SpaceRoomJoinRule
sourcefn 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 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.