Struct ruma_events::room::power_levels::RoomPowerLevelsEventContent
source · 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§
§ban: 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: Int
The default level required to send message events.
invite: Int
The level required to invite a user.
kick: Int
The level required to kick a user.
redact: Int
The level required to redact an event.
state_default: 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: Int
The default power level for every user in the room.
notifications: NotificationPowerLevels
The power level requirements for specific notification types.
This is a mapping from key
to power level for that notifications key.
Implementations§
Trait Implementations§
source§impl Clone for RoomPowerLevelsEventContent
impl Clone for RoomPowerLevelsEventContent
source§fn clone(&self) -> RoomPowerLevelsEventContent
fn clone(&self) -> RoomPowerLevelsEventContent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl EventContent for RoomPowerLevelsEventContent
impl EventContent for RoomPowerLevelsEventContent
source§type EventType = StateEventType
type EventType = StateEventType
The Rust enum for the event kind’s known types.
source§fn event_type(&self) -> Self::EventType
fn event_type(&self) -> Self::EventType
Get the event’s type, like
m.room.message
.source§impl From<RoomPowerLevels> for RoomPowerLevelsEventContent
impl From<RoomPowerLevels> for RoomPowerLevelsEventContent
source§fn from(c: RoomPowerLevels) -> Self
fn from(c: RoomPowerLevels) -> Self
Converts to this type from the input type.
source§impl From<RoomPowerLevelsEventContent> for AnyStateEventContent
impl From<RoomPowerLevelsEventContent> for AnyStateEventContent
source§fn from(c: RoomPowerLevelsEventContent) -> Self
fn from(c: RoomPowerLevelsEventContent) -> Self
Converts to this type from the input type.
source§impl From<RoomPowerLevelsEventContent> for RoomPowerLevels
impl From<RoomPowerLevelsEventContent> for RoomPowerLevels
source§fn from(c: RoomPowerLevelsEventContent) -> Self
fn from(c: RoomPowerLevelsEventContent) -> Self
Converts to this type from the input type.
source§impl PossiblyRedactedStateEventContent for RoomPowerLevelsEventContent
impl PossiblyRedactedStateEventContent for RoomPowerLevelsEventContent
source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
The type of the event’s
state_key
field.source§impl StateEventContent for RoomPowerLevelsEventContent
impl StateEventContent for RoomPowerLevelsEventContent
source§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
The type of the event’s
state_key
field.source§impl StaticStateEventContent for RoomPowerLevelsEventContent
impl StaticStateEventContent for RoomPowerLevelsEventContent
source§type PossiblyRedacted = RoomPowerLevelsEventContent
type PossiblyRedacted = RoomPowerLevelsEventContent
The possibly redacted form of the event’s content.
source§type Unsigned = StateUnsigned<<RoomPowerLevelsEventContent as StaticStateEventContent>::PossiblyRedacted>
type Unsigned = StateUnsigned<<RoomPowerLevelsEventContent as StaticStateEventContent>::PossiblyRedacted>
The type of the event’s
unsigned
field.Auto Trait Implementations§
impl Freeze for RoomPowerLevelsEventContent
impl RefUnwindSafe for RoomPowerLevelsEventContent
impl Send for RoomPowerLevelsEventContent
impl Sync for RoomPowerLevelsEventContent
impl Unpin for RoomPowerLevelsEventContent
impl UnwindSafe for RoomPowerLevelsEventContent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)