Mark GuestAccessEventContent as non_exhaustive

This commit is contained in:
Jonas Platte 2020-07-17 01:21:59 +02:00
parent b31a6eac65
commit 7bb6c66051
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -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]