Skip to content

Commit

Permalink
chore(sdk): Clean documentation and remove a useless pub(super).
Browse files Browse the repository at this point in the history
This patch is a small cleanup.
  • Loading branch information
Hywan committed Aug 21, 2024
1 parent 35f4f86 commit ddc8957
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions crates/matrix-sdk/src/sliding_sync/list/request_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@
//! * There is a set of ranges,
//! * Each request asks to load the particular ranges.
//!
//! In [`SlidingSyncMode::PagingFullSync`]:
//! In [`SlidingSyncMode::Paging`]:
//!
//! * There is a `batch_size`,
//! * Each request asks to load a new successive range containing exactly
//! `batch_size` rooms.
//!
//! In [`SlidingSyncMode::GrowingFullSync]:
//! In [`SlidingSyncMode::Growing]:
//!
//! * There is a `batch_size`,
//! * Each request asks to load a new range, always starting from 0, but where
//! the end is incremented by `batch_size` every time.
//!
//! The number of rooms to load is capped by the
//! [`SlidingSyncList::maximum_number_of_rooms`], i.e. the real number of
//! rooms it is possible to load. This value comes from the server.
//! The number of rooms to load is capped by a `maximum_number_of_rooms`, i.e.
//! the real number of rooms it is possible to load. This value comes from the
//! server.
//!
//! The number of rooms to load can _also_ be capped by the
//! [`SlidingSyncList::full_sync_maximum_number_of_rooms_to_fetch`], i.e. a
//! user-specified limit representing the maximum number of rooms the user
//! actually wants to load.
//! `maximum_number_of_rooms_to_fetch`, i.e. a user-specified limit representing
//! the maximum number of rooms the user actually wants to load.

use std::cmp::min;

Expand Down Expand Up @@ -80,7 +79,7 @@ pub(in super::super) struct SlidingSyncListRequestGenerator {
ranges: Ranges,

/// The kind of request generator.
pub(super) kind: SlidingSyncListRequestGeneratorKind,
kind: SlidingSyncListRequestGeneratorKind,
}

impl SlidingSyncListRequestGenerator {
Expand Down

0 comments on commit ddc8957

Please sign in to comment.