pub struct RoomPrivacySettings<'a> { /* private fields */ }
Expand description
A helper to group the methods in Room related to the room’s visibility and access.
Implementations§
Source§impl<'a> RoomPrivacySettings<'a>
impl<'a> RoomPrivacySettings<'a>
Sourcepub async fn publish_room_alias_in_room_directory(
&'a self,
alias: &RoomAliasId,
) -> Result<bool>
pub async fn publish_room_alias_in_room_directory( &'a self, alias: &RoomAliasId, ) -> Result<bool>
Publish a new room alias for this room in the room directory.
Returns:
true
if the room alias didn’t exist and it’s now published.false
if the room alias was already present so it couldn’t be published.
Sourcepub async fn remove_room_alias_from_room_directory(
&'a self,
alias: &RoomAliasId,
) -> Result<bool>
pub async fn remove_room_alias_from_room_directory( &'a self, alias: &RoomAliasId, ) -> Result<bool>
Remove an existing room alias for this room in the room directory.
Returns:
true
if the room alias was present and it’s now removed from the room directory.false
if the room alias didn’t exist so it couldn’t be removed.
Sourcepub async fn update_canonical_alias(
&'a self,
alias: Option<OwnedRoomAliasId>,
alt_aliases: Vec<OwnedRoomAliasId>,
) -> Result<()>
pub async fn update_canonical_alias( &'a self, alias: Option<OwnedRoomAliasId>, alt_aliases: Vec<OwnedRoomAliasId>, ) -> Result<()>
Update the canonical alias of the room.
§Arguments:
alias
- The new main alias to use for the room. ANone
value removes the existing main canonical alias.alt_aliases
- The list of alternative aliases for this room.
See https://spec.matrix.org/v1.12/client-server-api/#mroomcanonical_alias for more info about the canonical alias.
Note that publishing the alias in the room directory is done separately, and a room alias must have already been published before it can be set as the canonical alias.
Sourcepub async fn update_room_history_visibility(
&'a self,
new_value: HistoryVisibility,
) -> Result<()>
pub async fn update_room_history_visibility( &'a self, new_value: HistoryVisibility, ) -> Result<()>
Update room history visibility for this room.
The history visibility controls whether a user can see the events that happened in a room before they joined.
See https://spec.matrix.org/v1.12/client-server-api/#mroomcanonical_alias for more info.
Sourcepub async fn update_join_rule(&'a self, new_rule: JoinRule) -> Result<()>
pub async fn update_join_rule(&'a self, new_rule: JoinRule) -> Result<()>
Update the join rule for this room.
The join rules controls if and how a new user can get access to the room.
See https://spec.matrix.org/v1.12/client-server-api/#mroomjoin_rules for more info.
Sourcepub async fn get_room_visibility(&'a self) -> Result<Visibility>
pub async fn get_room_visibility(&'a self) -> Result<Visibility>
Returns the visibility for this room in the room directory.
Public rooms are listed in the room directory and can be found using it.
Sourcepub async fn update_room_visibility(
&'a self,
visibility: Visibility,
) -> Result<()>
pub async fn update_room_visibility( &'a self, visibility: Visibility, ) -> Result<()>
Update the visibility for this room in the room directory.
Public rooms are listed in the room directory and can be found using it.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RoomPrivacySettings<'a>
impl<'a> !RefUnwindSafe for RoomPrivacySettings<'a>
impl<'a> Send for RoomPrivacySettings<'a>
impl<'a> Sync for RoomPrivacySettings<'a>
impl<'a> Unpin for RoomPrivacySettings<'a>
impl<'a> !UnwindSafe for RoomPrivacySettings<'a>
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
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