Mark GuestAccessEventContent as non_exhaustive
This commit is contained in:
parent
b31a6eac65
commit
7bb6c66051
@ -14,12 +14,20 @@ pub type GuestAccessEvent = StateEvent<GuestAccessEventContent>;
|
||||
|
||||
/// The payload for `GuestAccessEvent`.
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, StateEventContent)]
|
||||
#[non_exhaustive]
|
||||
#[ruma_event(type = "m.room.guest_access")]
|
||||
pub struct GuestAccessEventContent {
|
||||
/// A policy for guest user access to a room.
|
||||
pub guest_access: GuestAccess,
|
||||
}
|
||||
|
||||
impl GuestAccessEventContent {
|
||||
/// Creates a new `GuestAccessEventContent` with the given policy.
|
||||
pub fn new(guest_access: GuestAccess) -> Self {
|
||||
Self { guest_access }
|
||||
}
|
||||
}
|
||||
|
||||
/// A policy for guest user access to a room.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Display, EnumString, Deserialize, Serialize)]
|
||||
#[non_exhaustive]
|
||||
|
Loading…
x
Reference in New Issue
Block a user