#[non_exhaustive]pub struct RoomSummary {
pub room_id: OwnedRoomId,
pub canonical_alias: Option<OwnedRoomAliasId>,
pub name: Option<String>,
pub topic: Option<String>,
pub avatar_url: Option<OwnedMxcUri>,
pub room_type: Option<RoomType>,
pub num_joined_members: UInt,
pub join_rule: JoinRuleSummary,
pub world_readable: bool,
pub guest_can_join: bool,
pub encryption: Option<EventEncryptionAlgorithm>,
pub room_version: Option<RoomVersionId>,
}Expand description
The summary of a room’s state.
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.room_id: OwnedRoomIdThe ID of the room.
canonical_alias: Option<OwnedRoomAliasId>The canonical alias of the room, if any.
If the compat-empty-string-null cargo feature is enabled, this field being an empty
string in JSON will result in None here during deserialization.
name: Option<String>The name of the room, if any.
topic: Option<String>The topic of the room, if any.
avatar_url: Option<OwnedMxcUri>The URL for the room’s avatar, if one is set.
If you activate the compat-empty-string-null feature, this field being an empty string in
JSON will result in None here during deserialization.
room_type: Option<RoomType>The type of room from m.room.create, if any.
num_joined_members: UIntThe number of members joined to the room.
join_rule: JoinRuleSummaryThe join rule of the room.
world_readable: boolWhether the room may be viewed by users without joining.
guest_can_join: boolWhether guest users may join the room and participate in it.
If they can, they will be subject to ordinary power level rules like any other user.
encryption: Option<EventEncryptionAlgorithm>If the room is encrypted, the algorithm used for this room.
room_version: Option<RoomVersionId>The version of the room.
Implementations§
Source§impl RoomSummary
impl RoomSummary
Sourcepub fn new(
room_id: OwnedRoomId,
join_rule: JoinRuleSummary,
guest_can_join: bool,
num_joined_members: UInt,
world_readable: bool,
) -> RoomSummary
Available on crate feature events only.
pub fn new( room_id: OwnedRoomId, join_rule: JoinRuleSummary, guest_can_join: bool, num_joined_members: UInt, world_readable: bool, ) -> RoomSummary
events only.Construct a new RoomSummary with the given required fields.
Trait Implementations§
Source§impl Clone for RoomSummary
impl Clone for RoomSummary
Source§fn clone(&self) -> RoomSummary
fn clone(&self) -> RoomSummary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoomSummary
impl Debug for RoomSummary
Source§impl<'de> Deserialize<'de> for RoomSummary
impl<'de> Deserialize<'de> for RoomSummary
Source§fn deserialize<D>(
deserializer: D,
) -> Result<RoomSummary, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<RoomSummary, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<PublicRoomsChunk> for RoomSummary
impl From<PublicRoomsChunk> for RoomSummary
Source§fn from(value: PublicRoomsChunk) -> RoomSummary
fn from(value: PublicRoomsChunk) -> RoomSummary
Source§impl From<RoomSummary> for PublicRoomsChunk
impl From<RoomSummary> for PublicRoomsChunk
Source§fn from(value: RoomSummary) -> PublicRoomsChunk
fn from(value: RoomSummary) -> PublicRoomsChunk
Source§impl From<RoomSummary> for Response
impl From<RoomSummary> for Response
Source§fn from(value: RoomSummary) -> Response
fn from(value: RoomSummary) -> Response
Source§impl Serialize for RoomSummary
impl Serialize for RoomSummary
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for RoomSummary
impl RefUnwindSafe for RoomSummary
impl Send for RoomSummary
impl Sync for RoomSummary
impl Unpin for RoomSummary
impl UnwindSafe for RoomSummary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more