Struct matrix_sdk_base::RoomInfo
source · pub struct RoomInfo { /* private fields */ }
Expand description
The underlying pure data structure for joined and left rooms.
Holds all the info needed to persist a room into the state store.
Implementations§
source§impl RoomInfo
impl RoomInfo
sourcepub fn mark_as_joined(&mut self)
pub fn mark_as_joined(&mut self)
Mark this Room as joined.
sourcepub fn mark_as_left(&mut self)
pub fn mark_as_left(&mut self)
Mark this Room as left.
sourcepub fn mark_as_invited(&mut self)
pub fn mark_as_invited(&mut self)
Mark this Room as invited.
sourcepub fn mark_members_synced(&mut self)
pub fn mark_members_synced(&mut self)
Mark this Room as having all the members synced.
sourcepub fn mark_members_missing(&mut self)
pub fn mark_members_missing(&mut self)
Mark this Room as still missing member information.
sourcepub fn mark_state_partially_synced(&mut self)
pub fn mark_state_partially_synced(&mut self)
Mark this Room as still missing some state information.
sourcepub fn mark_state_fully_synced(&mut self)
pub fn mark_state_fully_synced(&mut self)
Mark this Room as still having all state synced.
sourcepub fn mark_state_not_synced(&mut self)
pub fn mark_state_not_synced(&mut self)
Mark this Room as still having no state synced.
sourcepub fn mark_encryption_state_synced(&mut self)
pub fn mark_encryption_state_synced(&mut self)
Mark this Room as having the encryption state synced.
sourcepub fn mark_encryption_state_missing(&mut self)
pub fn mark_encryption_state_missing(&mut self)
Mark this Room as still missing encryption state information.
sourcepub fn set_prev_batch(&mut self, prev_batch: Option<&str>) -> bool
pub fn set_prev_batch(&mut self, prev_batch: Option<&str>) -> bool
Set the prev_batch
-token.
Returns whether the token has differed and thus has been upgraded:
false
means no update was applied as the were the same
sourcepub fn is_encrypted(&self) -> bool
pub fn is_encrypted(&self) -> bool
Returns whether this is an encrypted room.
sourcepub fn set_encryption_event(
&mut self,
event: Option<RoomEncryptionEventContent>
)
pub fn set_encryption_event( &mut self, event: Option<RoomEncryptionEventContent> )
Set the encryption event content in this room.
sourcepub fn handle_state_event(&mut self, event: &AnySyncStateEvent) -> bool
pub fn handle_state_event(&mut self, event: &AnySyncStateEvent) -> bool
Handle the given state event.
Returns true if the event modified the info, false otherwise.
sourcepub fn handle_stripped_state_event(
&mut self,
event: &AnyStrippedStateEvent
) -> bool
pub fn handle_stripped_state_event( &mut self, event: &AnyStrippedStateEvent ) -> bool
Handle the given stripped state event.
Returns true if the event modified the info, false otherwise.
sourcepub fn handle_redaction(
&mut self,
event: &SyncRoomRedactionEvent,
_raw: &Raw<SyncRoomRedactionEvent>
)
pub fn handle_redaction( &mut self, event: &SyncRoomRedactionEvent, _raw: &Raw<SyncRoomRedactionEvent> )
Handle the given redaction.
sourcepub fn update_name(&mut self, name: String)
pub fn update_name(&mut self, name: String)
Update the room name
sourcepub fn update_notification_count(
&mut self,
notification_counts: UnreadNotificationsCount
)
pub fn update_notification_count( &mut self, notification_counts: UnreadNotificationsCount )
Update the notifications count
sourcepub fn update_summary(&mut self, summary: &RumaSummary) -> bool
pub fn update_summary(&mut self, summary: &RumaSummary) -> bool
Update the RoomSummary
Returns true if the Summary modified the info, false otherwise.
sourcepub fn active_members_count(&self) -> u64
pub fn active_members_count(&self) -> u64
The number of active members (invited + joined) in the room.
The return value is saturated at u64::MAX
.
sourcepub fn invited_members_count(&self) -> u64
pub fn invited_members_count(&self) -> u64
The number of invited members in the room
sourcepub fn joined_members_count(&self) -> u64
pub fn joined_members_count(&self) -> u64
The number of joined members in the room
sourcepub fn canonical_alias(&self) -> Option<&RoomAliasId>
pub fn canonical_alias(&self) -> Option<&RoomAliasId>
Get the canonical alias of this room.
sourcepub fn alt_aliases(&self) -> &[OwnedRoomAliasId]
pub fn alt_aliases(&self) -> &[OwnedRoomAliasId]
Get the alternative aliases of this room.
sourcepub fn room_version(&self) -> Option<&RoomVersionId>
pub fn room_version(&self) -> Option<&RoomVersionId>
Get the room version of this room.
sourcepub fn has_active_room_call(&self) -> bool
pub fn has_active_room_call(&self) -> bool
Is there a non expired membership with application “m.call” and scope “m.room” in this room.
sourcepub fn active_room_call_participants(&self) -> Vec<OwnedUserId>
pub fn active_room_call_participants(&self) -> Vec<OwnedUserId>
Returns a Vec of userId’s that participate in the room call.
matrix_rtc memberships with application “m.call” and scope “m.room” are considered. A user can occur twice if they join with two devices. convert to a set depending if the different users are required or the amount of sessions.
The vector is ordered by oldest membership user to newest.