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
sourceimpl 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 still missing member 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
Whether this is an encrypted 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: &OriginalSyncRoomRedactionEvent)
pub fn handle_redaction(&mut self, event: &OriginalSyncRoomRedactionEvent)
Handle the given redaction.
Returns true if the event modified the info, false otherwise.
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 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.