#[non_exhaustive]pub enum RoomPowerLevelsSource {
Original(RoomPowerLevelsEventContent),
Redacted(RedactedRoomPowerLevelsEventContent),
None,
}
Expand description
The possible power level sources for RoomPowerLevels
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Original(RoomPowerLevelsEventContent)
Construct RoomPowerLevels
from the non-redacted m.room.power_levels
event content.
Redacted(RedactedRoomPowerLevelsEventContent)
Construct RoomPowerLevels
from the redacted m.room.power_levels
event content.
None
Use the default values defined in the specification.
Should only be used when there is no power levels state in a room.
Trait Implementations§
Source§impl Default for RoomPowerLevelsSource
impl Default for RoomPowerLevelsSource
Source§fn default() -> RoomPowerLevelsSource
fn default() -> RoomPowerLevelsSource
Returns the “default value” for a type. Read more
Source§impl From<Option<RedactedRoomPowerLevelsEventContent>> for RoomPowerLevelsSource
impl From<Option<RedactedRoomPowerLevelsEventContent>> for RoomPowerLevelsSource
Source§fn from(value: Option<RedactedRoomPowerLevelsEventContent>) -> Self
fn from(value: Option<RedactedRoomPowerLevelsEventContent>) -> Self
Converts to this type from the input type.
Source§impl From<Option<RoomPowerLevelsEventContent>> for RoomPowerLevelsSource
impl From<Option<RoomPowerLevelsEventContent>> for RoomPowerLevelsSource
Source§fn from(value: Option<RoomPowerLevelsEventContent>) -> Self
fn from(value: Option<RoomPowerLevelsEventContent>) -> Self
Converts to this type from the input type.
Source§impl From<RedactedRoomPowerLevelsEventContent> for RoomPowerLevelsSource
impl From<RedactedRoomPowerLevelsEventContent> for RoomPowerLevelsSource
Source§fn from(value: RedactedRoomPowerLevelsEventContent) -> Self
fn from(value: RedactedRoomPowerLevelsEventContent) -> Self
Converts to this type from the input type.
Source§impl From<RoomPowerLevelsEventContent> for RoomPowerLevelsSource
impl From<RoomPowerLevelsEventContent> for RoomPowerLevelsSource
Source§fn from(value: RoomPowerLevelsEventContent) -> Self
fn from(value: RoomPowerLevelsEventContent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RoomPowerLevelsSource
impl RefUnwindSafe for RoomPowerLevelsSource
impl Send for RoomPowerLevelsSource
impl Sync for RoomPowerLevelsSource
impl Unpin for RoomPowerLevelsSource
impl UnwindSafe for RoomPowerLevelsSource
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