feat(ffi): expose `set_sync_mode` on the sliding sync list

Signed-off-by: Benjamin Bouvier <public@benj.me>
This commit is contained in:
Benjamin Bouvier 2023-05-30 17:00:36 +02:00
parent 623ff6fa83
commit 4ca8d61c56
1 changed files with 10 additions and 0 deletions

View File

@ -652,6 +652,16 @@ impl SlidingSyncList {
pub fn unset_timeline_limit(&self) {
self.inner.set_timeline_limit(None)
}
/// Changes the sync mode, and automatically restarts the sliding sync
/// internally.
pub fn set_sync_mode(
&self,
builder: Arc<SlidingSyncSelectiveModeBuilder>,
) -> Result<(), ClientError> {
let builder = unwrap_or_clone_arc(builder);
self.inner.set_sync_mode(builder.inner).map_err(Into::into)
}
}
pub trait SlidingSyncObserver: Sync + Send {