mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 19:45:34 -04:00
doc(sdk): Improve doc of EventCache.
This commit is contained in:
@@ -517,8 +517,8 @@ impl RoomEventCacheInner {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Remove existing events, and append a set of events to the room cache and
|
||||
// storage, notifying observers.
|
||||
/// Remove existing events, and append a set of events to the room cache and
|
||||
/// storage, notifying observers.
|
||||
async fn replace_all_events_by(
|
||||
&self,
|
||||
events: Vec<SyncTimelineEvent>,
|
||||
|
||||
@@ -65,7 +65,7 @@ impl RoomEvents {
|
||||
self.push_events(once(event))
|
||||
}
|
||||
|
||||
/// Push events after existing events.
|
||||
/// Push events after all events or gaps.
|
||||
///
|
||||
/// The last event in `events` is the most recent one.
|
||||
pub fn push_events<I>(&mut self, events: I)
|
||||
@@ -76,7 +76,7 @@ impl RoomEvents {
|
||||
self.chunks.push_items_back(events)
|
||||
}
|
||||
|
||||
/// Push a gap after existing events.
|
||||
/// Push a gap after all events or gaps.
|
||||
pub fn push_gap(&mut self, gap: Gap) {
|
||||
self.chunks.push_gap_back(gap)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user