#[non_exhaustive]pub struct RoomPowerLevelsRules {
pub privileged_creators: Option<HashSet<OwnedUserId>>,
}
Expand description
The tweaks for determining the power level of a user.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.privileged_creators: Option<HashSet<OwnedUserId>>
The creator(s) of the room which are considered to have “infinite” power level, introduced in room version 12.
Implementations§
Source§impl RoomPowerLevelsRules
impl RoomPowerLevelsRules
Sourcepub fn new(
rules: &AuthorizationRules,
creators: impl IntoIterator<Item = OwnedUserId>,
) -> Self
pub fn new( rules: &AuthorizationRules, creators: impl IntoIterator<Item = OwnedUserId>, ) -> Self
Creates a new RoomPowerLevelsRules
from the given parameters, using the creators
if
the rule explicitly_privilege_room_creators
is true
.
Trait Implementations§
Source§impl Clone for RoomPowerLevelsRules
impl Clone for RoomPowerLevelsRules
Source§fn clone(&self) -> RoomPowerLevelsRules
fn clone(&self) -> RoomPowerLevelsRules
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for RoomPowerLevelsRules
impl RefUnwindSafe for RoomPowerLevelsRules
impl Send for RoomPowerLevelsRules
impl Sync for RoomPowerLevelsRules
impl Unpin for RoomPowerLevelsRules
impl UnwindSafe for RoomPowerLevelsRules
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