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:
trueif the room alias didn’t exist and it’s now published.falseif 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:
trueif the room alias was present and it’s now removed from the room directory.falseif 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. ANonevalue removes the existing main canonical alias.alt_aliases- The list of alternative aliases for this room.
See the specification 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 the specification 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 the specification for more info.
Sourcepub async fn update_room_retention(
&'a self,
content: RoomRetentionEventContent,
) -> Result<()>
pub async fn update_room_retention( &'a self, content: RoomRetentionEventContent, ) -> Result<()>
Update the message retention policy for this room.
The caller must have a power level sufficient to send the
m.room.retention state event (typically power level 50). The server
will reject the request if the power level is insufficient.
The content must satisfy max_lifetime >= min_lifetime; use
RoomRetentionEventContent’s builder methods to construct a valid
value.
See MSC1763 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> !RefUnwindSafe for RoomPrivacySettings<'a>
impl<'a> !UnwindSafe for RoomPrivacySettings<'a>
impl<'a> Freeze for RoomPrivacySettings<'a>
impl<'a> Send for RoomPrivacySettings<'a>
impl<'a> Sync for RoomPrivacySettings<'a>
impl<'a> Unpin for RoomPrivacySettings<'a>
impl<'a> UnsafeUnpin for RoomPrivacySettings<'a>
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
impl<T> AsyncTraitDeps for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit 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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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