refactor(base): Make AmbiguityChange(s) non-exhaustive

They are meant to be consumed, but not created, by other crates.
This commit is contained in:
Jonas Platte
2023-01-16 10:51:07 +01:00
committed by Jonas Platte
parent 70de11a73a
commit 4febe45364

View File

@@ -30,6 +30,7 @@ use serde::{Deserialize, Serialize};
/// A change in ambiguity of room members that an `m.room.member` event
/// triggers.
#[derive(Clone, Debug, Default)]
#[non_exhaustive]
pub struct AmbiguityChange {
/// Is the member that is contained in the state key of the `m.room.member`
/// event itself ambiguous because of the event.
@@ -42,6 +43,7 @@ pub struct AmbiguityChange {
/// Collection of ambiguioty changes that room member events trigger.
#[derive(Clone, Debug, Default)]
#[non_exhaustive]
pub struct AmbiguityChanges {
/// A map from room id to a map of an event id to the `AmbiguityChange` that
/// the event with the given id caused.