Struct RoomPowerLevelsContentOverride
#[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,
}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§
§impl RoomPowerLevelsContentOverride
impl RoomPowerLevelsContentOverride
pub fn new() -> RoomPowerLevelsContentOverride
pub fn new() -> RoomPowerLevelsContentOverride
Creates a new, empty RoomPowerLevelsContentOverride instance.
Trait Implementations§
§impl Clone for RoomPowerLevelsContentOverride
impl Clone for RoomPowerLevelsContentOverride
§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§impl Debug for RoomPowerLevelsContentOverride
impl Debug for RoomPowerLevelsContentOverride
§impl Default for RoomPowerLevelsContentOverride
impl Default for RoomPowerLevelsContentOverride
§fn default() -> RoomPowerLevelsContentOverride
fn default() -> RoomPowerLevelsContentOverride
§impl From<RoomPowerLevelsEventContent> for RoomPowerLevelsContentOverride
impl From<RoomPowerLevelsEventContent> for RoomPowerLevelsContentOverride
§fn from(value: RoomPowerLevelsEventContent) -> RoomPowerLevelsContentOverride
fn from(value: RoomPowerLevelsEventContent) -> RoomPowerLevelsContentOverride
§impl Serialize for RoomPowerLevelsContentOverride
impl Serialize for RoomPowerLevelsContentOverride
§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,
impl JsonCastable<Map<String, Value>> for RoomPowerLevelsContentOverride
impl JsonCastable<RoomPowerLevelsContentOverride> for RoomPowerLevelsEventContent
impl JsonCastable<RoomPowerLevelsEventContent> for RoomPowerLevelsContentOverride
Auto Trait Implementations§
impl Freeze for RoomPowerLevelsContentOverride
impl RefUnwindSafe for RoomPowerLevelsContentOverride
impl Send for RoomPowerLevelsContentOverride
impl Sync for RoomPowerLevelsContentOverride
impl Unpin for RoomPowerLevelsContentOverride
impl UnwindSafe for RoomPowerLevelsContentOverride
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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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