#[non_exhaustive]pub struct AuthorizationRules {
pub special_case_room_redaction: bool,
pub special_case_room_aliases: bool,
pub strict_canonical_json: bool,
pub limit_notifications_power_levels: bool,
pub knocking: bool,
pub restricted_join_rule: bool,
pub knock_restricted_join_rule: bool,
pub integer_power_levels: bool,
pub use_room_create_sender: bool,
pub explicitly_privilege_room_creators: bool,
pub additional_room_creators: bool,
pub room_create_event_id_as_room_id: bool,
}Expand description
The tweaks in the authorization rules for a room version.
This type can be constructed from one of its constants (like AuthorizationRules::V1), or by
constructing a RoomVersionRules first and using the authorization 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.special_case_room_redaction: boolWhether to apply special authorization rules for m.room.redaction events (spec),
disabled since room version 3.
special_case_room_aliases: boolWhether to apply special authorization rules for m.room.aliases events (spec), disabled
since room version 6.
strict_canonical_json: boolWhether to strictly enforce canonical JSON (spec), introduced in room version 6.
Numbers in Canonical JSON must be integers in the range [-253 + 1,
253 - 1], represented without exponents or decimal places, and negative zero
(-0) MUST NOT appear.
limit_notifications_power_levels: boolWhether to check the notifications field when checking m.room.power_levels events
(spec), introduced in room version 6.
knocking: boolWhether to allow the knock membership for m.room.member events and the knock join
rule for m.room.join_rules events (spec), introduced in room version 7.
restricted_join_rule: boolWhether to allow the restricted join rule for m.room.join_rules events (spec),
introduced in room version 8.
knock_restricted_join_rule: boolWhether to allow the knock_restricted join rule for m.room.join_rules events (spec),
introduced in room version 10.
integer_power_levels: boolWhether to enforce that power levels values in m.room.power_levels events be integers
(spec), introduced in room version 10.
use_room_create_sender: boolWhether the room creator should be determined using the m.room.create event’s sender,
instead of the event content’s creator field (spec), introduced in room version 11.
explicitly_privilege_room_creators: boolWhether room creators should always be considered to have “infinite” power level, introduced in room version 12.
additional_room_creators: boolWhether additional room creators can be set with the content.additional_creators field of
an m.room.create event, introduced in room version 12.
room_create_event_id_as_room_id: boolWhether to use the event ID of the m.room.create event of the room as the room ID,
introduced in room version 12.
Implementations§
Trait Implementations§
Source§impl Clone for AuthorizationRules
impl Clone for AuthorizationRules
Source§fn clone(&self) -> AuthorizationRules
fn clone(&self) -> AuthorizationRules
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more