Type Alias PossiblyRedactedRoomPowerLevelsEventContent

Source
pub type PossiblyRedactedRoomPowerLevelsEventContent = RoomPowerLevelsEventContent;
Available on crate feature events only.
Expand description

The possibly redacted form of RoomPowerLevelsEventContent.

This type is used when it’s not obvious whether the content is redacted or not.

Aliased Type§

struct PossiblyRedactedRoomPowerLevelsEventContent {
    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,
}

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

Source§

impl RoomPowerLevelsEventContent

Source

pub fn new() -> RoomPowerLevelsEventContent

Creates a new RoomPowerLevelsEventContent with all-default values.

Trait Implementations

Source§

impl Clone for RoomPowerLevelsEventContent

Source§

fn clone(&self) -> RoomPowerLevelsEventContent

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RoomPowerLevelsEventContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for RoomPowerLevelsEventContent

Source§

fn default() -> RoomPowerLevelsEventContent

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RoomPowerLevelsEventContent

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<RoomPowerLevelsEventContent, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl EventContent for RoomPowerLevelsEventContent

Source§

type EventType = StateEventType

The Rust enum for the event kind’s known types.
Source§

fn event_type(&self) -> <RoomPowerLevelsEventContent as EventContent>::EventType

Get the event’s type, like m.room.message.
Source§

impl From<RoomPowerLevels> for RoomPowerLevelsEventContent

Source§

fn from(c: RoomPowerLevels) -> RoomPowerLevelsEventContent

Converts to this type from the input type.
Source§

impl PossiblyRedactedStateEventContent for RoomPowerLevelsEventContent

Source§

type StateKey = EmptyStateKey

The type of the event’s state_key field.
Source§

impl RedactContent for RoomPowerLevelsEventContent

Source§

type Redacted = RedactedRoomPowerLevelsEventContent

The redacted form of the event’s content.
Source§

fn redact( self, version: &RoomVersionId, ) -> <RoomPowerLevelsEventContent as RedactContent>::Redacted

Transform self into a redacted form (removing most or all fields) according to the spec. Read more
Source§

impl Serialize for RoomPowerLevelsEventContent

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StateEventContent for RoomPowerLevelsEventContent

Source§

type StateKey = EmptyStateKey

The type of the event’s state_key field.
Source§

impl StaticEventContent for RoomPowerLevelsEventContent

Source§

const TYPE: &'static str = "m.room.power_levels"

The event type.
Source§

impl StaticStateEventContent for RoomPowerLevelsEventContent

Source§

type PossiblyRedacted = RoomPowerLevelsEventContent

The possibly redacted form of the event’s content.
Source§

type Unsigned = StateUnsigned<<RoomPowerLevelsEventContent as StaticStateEventContent>::PossiblyRedacted>

The type of the event’s unsigned field.