Enum ruma_common::events::room::join_rules::AllowRule
source · pub enum AllowRule {
RoomMembership(RoomMembership),
// some variants omitted
}Available on crate feature
events only.Expand description
An allow rule which defines a condition that allows joining a room.
Variants§
RoomMembership(RoomMembership)
Joining is allowed if a user is already a member of the room with the id room_id.
Implementations§
source§impl AllowRule
impl AllowRule
sourcepub fn room_membership(room_id: OwnedRoomId) -> Self
pub fn room_membership(room_id: OwnedRoomId) -> Self
Constructs an AllowRule with membership of the room with the given id as its predicate.
Trait Implementations§
source§impl<'de> Deserialize<'de> for AllowRule
impl<'de> Deserialize<'de> for AllowRule
source§fn deserialize<D>(deserializer: D) -> Result<AllowRule, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<AllowRule, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<AllowRule> for AllowRule
impl PartialEq<AllowRule> for AllowRule
impl Eq for AllowRule
impl StructuralEq for AllowRule
impl StructuralPartialEq for AllowRule
Auto Trait Implementations§
impl RefUnwindSafe for AllowRule
impl Send for AllowRule
impl Sync for AllowRule
impl Unpin for AllowRule
impl UnwindSafe for AllowRule
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
Compare self to
key and return true if they are equal.