pub struct SyncConfigBuilder { /* private fields */ }Expand description
Builder for sync configuration.
Implementations§
Source§impl SyncConfigBuilder
impl SyncConfigBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a builder initialized with SyncConfig::default.
Sourcepub fn sync_interval(self, ms: u64) -> Self
pub fn sync_interval(self, ms: u64) -> Self
Set how often periodic sync should run (milliseconds).
Sourcepub fn presence_interval(self, ms: u64) -> Self
pub fn presence_interval(self, ms: u64) -> Self
Set how often presence updates should be emitted (milliseconds).
Sourcepub fn sync_timeout(self, ms: u64) -> Self
pub fn sync_timeout(self, ms: u64) -> Self
Set the sync request timeout (milliseconds).
Sourcepub fn max_batch_size(self, size: usize) -> Self
pub fn max_batch_size(self, size: usize) -> Self
Set the maximum number of deltas to send in one batch.
Sourcepub fn auto_sync(self, enabled: bool) -> Self
pub fn auto_sync(self, enabled: bool) -> Self
Enable or disable automatic background synchronization.
Sourcepub fn build(self) -> SyncConfig
pub fn build(self) -> SyncConfig
Build and return the final SyncConfig.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyncConfigBuilder
impl RefUnwindSafe for SyncConfigBuilder
impl Send for SyncConfigBuilder
impl Sync for SyncConfigBuilder
impl Unpin for SyncConfigBuilder
impl UnsafeUnpin for SyncConfigBuilder
impl UnwindSafe for SyncConfigBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more