#[non_exhaustive]pub struct RoomPowerLevelsEventContent {
pub ban: Int,
pub events: BTreeMap<TimelineEventType, Int>,
pub events_default: Int,
pub invite: Int,
pub kick: Int,
pub redact: Int,
pub state_default: Int,
pub users: BTreeMap<OwnedUserId, Int>,
pub users_default: Int,
pub notifications: NotificationPowerLevels,
}Expand description
The content of an m.room.power_levels event.
Defines the power levels (privileges) of users in the room.
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: IntThe 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: IntThe default level required to send message events.
invite: IntThe level required to invite a user.
kick: IntThe level required to kick a user.
redact: IntThe level required to redact an event.
state_default: IntThe 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: IntThe 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 RoomPowerLevelsEventContent
impl RoomPowerLevelsEventContent
Sourcepub fn new(rules: &AuthorizationRules) -> Self
pub fn new(rules: &AuthorizationRules) -> Self
Creates a new RoomPowerLevelsEventContent with all-default values for the given
authorization rules.
Trait Implementations§
Source§impl Clone for RoomPowerLevelsEventContent
impl Clone for RoomPowerLevelsEventContent
Source§fn clone(&self) -> RoomPowerLevelsEventContent
fn clone(&self) -> RoomPowerLevelsEventContent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoomPowerLevelsEventContent
impl Debug for RoomPowerLevelsEventContent
Source§impl<'de> Deserialize<'de> for RoomPowerLevelsEventContent
impl<'de> Deserialize<'de> for RoomPowerLevelsEventContent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<RoomPowerLevelsEventContent> for AnyStateEventContent
impl From<RoomPowerLevelsEventContent> for AnyStateEventContent
Source§fn from(c: RoomPowerLevelsEventContent) -> Self
fn from(c: RoomPowerLevelsEventContent) -> Self
Source§impl From<RoomPowerLevelsEventContent> for RoomPowerLevelsSource
impl From<RoomPowerLevelsEventContent> for RoomPowerLevelsSource
Source§fn from(value: RoomPowerLevelsEventContent) -> Self
fn from(value: RoomPowerLevelsEventContent) -> Self
Source§impl PossiblyRedactedStateEventContent for RoomPowerLevelsEventContent
impl PossiblyRedactedStateEventContent for RoomPowerLevelsEventContent
Source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
state_key field.Source§fn event_type(&self) -> StateEventType
fn event_type(&self) -> StateEventType
m.room.name.Source§impl RedactContent for RoomPowerLevelsEventContent
impl RedactContent for RoomPowerLevelsEventContent
Source§type Redacted = RedactedRoomPowerLevelsEventContent
type Redacted = RedactedRoomPowerLevelsEventContent
Source§impl StateEventContent for RoomPowerLevelsEventContent
impl StateEventContent for RoomPowerLevelsEventContent
Source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
state_key field.Source§fn event_type(&self) -> StateEventType
fn event_type(&self) -> StateEventType
m.room.name.Source§impl StaticStateEventContent for RoomPowerLevelsEventContent
impl StaticStateEventContent for RoomPowerLevelsEventContent
Source§type PossiblyRedacted = RoomPowerLevelsEventContent
type PossiblyRedacted = RoomPowerLevelsEventContent
Source§type Unsigned = StateUnsigned<<RoomPowerLevelsEventContent as StaticStateEventContent>::PossiblyRedacted>
type Unsigned = StateUnsigned<<RoomPowerLevelsEventContent as StaticStateEventContent>::PossiblyRedacted>
unsigned field.