#[non_exhaustive]pub struct RoomPowerLevelsContentOverride {
pub ban: Option<Int>,
pub events: BTreeMap<TimelineEventType, Int>,
pub events_default: Option<Int>,
pub invite: Option<Int>,
pub kick: Option<Int>,
pub redact: Option<Int>,
pub state_default: Option<Int>,
pub users: BTreeMap<OwnedUserId, Int>,
pub users_default: Option<Int>,
pub notifications: NotificationPowerLevels,
}api and (crate features client-api-c or client-api-s) and (crate features client or server) only.Expand description
The power level values that can be overridden when creating a room.
This has the same fields as RoomPowerLevelsEventContent, but most of them are Options.
Contrary to RoomPowerLevelsEventContent which doesn’t serialize fields that are set to their
default value defined in the Matrix specification, this type serializes all fields that are
Some(_), regardless of their value.
This type is used to allow clients to avoid server behavior observed in the wild that sets
custom default values for fields that are not set in the create_room request, while a client
wants the server to use the default value defined in the Matrix specification for that field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ban: Option<Int>The level required to ban a user.
events: BTreeMap<TimelineEventType, Int>The level required to send specific event types.
This is a mapping from event type to power level required.
events_default: Option<Int>The default level required to send message events.
invite: Option<Int>The level required to invite a user.
kick: Option<Int>The level required to kick a user.
redact: Option<Int>The level required to redact an event.
state_default: Option<Int>The default level required to send state events.
users: BTreeMap<OwnedUserId, Int>The power levels for specific users.
This is a mapping from user_id to power level for that user.
users_default: Option<Int>The default power level for every user in the room.
notifications: NotificationPowerLevelsThe power level requirements for specific notification types.
This is a mapping from key to power level for that notifications key.
Implementations§
Source§impl RoomPowerLevelsContentOverride
impl RoomPowerLevelsContentOverride
Sourcepub fn new() -> RoomPowerLevelsContentOverride
pub fn new() -> RoomPowerLevelsContentOverride
Creates a new, empty RoomPowerLevelsContentOverride instance.
Trait Implementations§
Source§impl Clone for RoomPowerLevelsContentOverride
impl Clone for RoomPowerLevelsContentOverride
Source§fn clone(&self) -> RoomPowerLevelsContentOverride
fn clone(&self) -> RoomPowerLevelsContentOverride
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more