From 96248248ca922d8fce56097d79ff4968aecc355d Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 27 Feb 2023 13:56:04 +0100 Subject: [PATCH] chore(sdk): Move `UpdateSummary` at the bottom of the module. --- crates/matrix-sdk/src/sliding_sync/mod.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/crates/matrix-sdk/src/sliding_sync/mod.rs b/crates/matrix-sdk/src/sliding_sync/mod.rs index 9574c9672..27521ee19 100644 --- a/crates/matrix-sdk/src/sliding_sync/mod.rs +++ b/crates/matrix-sdk/src/sliding_sync/mod.rs @@ -651,15 +651,6 @@ pub use view::*; use crate::{config::RequestConfig, Client, Result}; -/// The Summary of a new SlidingSync Update received -#[derive(Debug, Clone)] -pub struct UpdateSummary { - /// The views (according to their name), which have seen an update - pub views: Vec, - /// The Rooms that have seen updates - pub rooms: Vec, -} - /// Number of times a Sliding Sync session can expire before raising an error. /// /// A Sliding Sync session can expire. In this case, it is reset. However, to @@ -669,7 +660,7 @@ pub struct UpdateSummary { /// raising a proper error. const MAXIMUM_SLIDING_SYNC_SESSION_EXPIRATION: u8 = 3; -/// The sliding sync instance +/// The Sliding Sync instance. #[derive(Clone, Debug)] pub struct SlidingSync { /// Customize the homeserver for sliding sync only @@ -1188,6 +1179,16 @@ impl SlidingSync { } } +/// A summary of the updates received after a sync (like in +/// [`SlidingSync::stream`]). +#[derive(Debug, Clone)] +pub struct UpdateSummary { + /// The names of the views that have seen an update. + pub views: Vec, + /// The rooms that have seen updates + pub rooms: Vec, +} + #[cfg(test)] mod test { use ruma::room_id;