Struct matrix_sdk_base::ruma::events::room::power_levels::RoomPowerLevelsEventContent
source · #[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: 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
impl RoomPowerLevelsEventContent
sourcepub fn new() -> RoomPowerLevelsEventContent
pub fn new() -> RoomPowerLevelsEventContent
Creates a new RoomPowerLevelsEventContent
with all-default values.
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 Default for RoomPowerLevelsEventContent
impl Default for RoomPowerLevelsEventContent
source§fn default() -> RoomPowerLevelsEventContent
fn default() -> RoomPowerLevelsEventContent
source§impl<'de> Deserialize<'de> for RoomPowerLevelsEventContent
impl<'de> Deserialize<'de> for RoomPowerLevelsEventContent
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RoomPowerLevelsEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RoomPowerLevelsEventContent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl EventContent for RoomPowerLevelsEventContent
impl EventContent for RoomPowerLevelsEventContent
§type EventType = StateEventType
type EventType = StateEventType
source§fn event_type(&self) -> <RoomPowerLevelsEventContent as EventContent>::EventType
fn event_type(&self) -> <RoomPowerLevelsEventContent as EventContent>::EventType
m.room.message
.source§impl From<RoomPowerLevels> for RoomPowerLevelsEventContent
impl From<RoomPowerLevels> for RoomPowerLevelsEventContent
source§fn from(c: RoomPowerLevels) -> RoomPowerLevelsEventContent
fn from(c: RoomPowerLevels) -> RoomPowerLevelsEventContent
source§impl From<RoomPowerLevelsEventContent> for AnyStateEventContent
impl From<RoomPowerLevelsEventContent> for AnyStateEventContent
source§fn from(c: RoomPowerLevelsEventContent) -> AnyStateEventContent
fn from(c: RoomPowerLevelsEventContent) -> AnyStateEventContent
source§impl From<RoomPowerLevelsEventContent> for RoomPowerLevels
impl From<RoomPowerLevelsEventContent> for RoomPowerLevels
source§fn from(c: RoomPowerLevelsEventContent) -> RoomPowerLevels
fn from(c: RoomPowerLevelsEventContent) -> RoomPowerLevels
source§impl PossiblyRedactedStateEventContent for RoomPowerLevelsEventContent
impl PossiblyRedactedStateEventContent for RoomPowerLevelsEventContent
§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
state_key
field.source§impl RedactContent for RoomPowerLevelsEventContent
impl RedactContent for RoomPowerLevelsEventContent
§type Redacted = RedactedRoomPowerLevelsEventContent
type Redacted = RedactedRoomPowerLevelsEventContent
source§fn redact(
self,
version: &RoomVersionId,
) -> <RoomPowerLevelsEventContent as RedactContent>::Redacted
fn redact( self, version: &RoomVersionId, ) -> <RoomPowerLevelsEventContent as RedactContent>::Redacted
self
into a redacted form (removing most or all fields) according to the spec. Read moresource§impl Serialize for RoomPowerLevelsEventContent
impl Serialize for RoomPowerLevelsEventContent
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl StateEventContent for RoomPowerLevelsEventContent
impl StateEventContent for RoomPowerLevelsEventContent
§type StateKey = EmptyStateKey
type StateKey = EmptyStateKey
state_key
field.source§impl StaticStateEventContent for RoomPowerLevelsEventContent
impl StaticStateEventContent for RoomPowerLevelsEventContent
§type PossiblyRedacted = RoomPowerLevelsEventContent
type PossiblyRedacted = RoomPowerLevelsEventContent
§type Unsigned = StateUnsigned<<RoomPowerLevelsEventContent as StaticStateEventContent>::PossiblyRedacted>
type Unsigned = StateUnsigned<<RoomPowerLevelsEventContent as StaticStateEventContent>::PossiblyRedacted>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> EventContentFromType for Twhere
T: EventContent + DeserializeOwned,
impl<T> EventContentFromType for Twhere
T: EventContent + DeserializeOwned,
source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more