pub struct SyncConfiguration<T> { /* private fields */ }Expand description
Configuration parameters for data synchronisation between peers.
Implementations§
Source§impl<T> SyncConfiguration<T>where
T: TopicQuery,
impl<T> SyncConfiguration<T>where
T: TopicQuery,
Sourcepub fn new(protocol: impl for<'a> SyncProtocol<'a, T> + 'static) -> Self
pub fn new(protocol: impl for<'a> SyncProtocol<'a, T> + 'static) -> Self
Return a default instance of SyncConfiguration.
Sourcepub fn max_concurrent_sync_sessions(self, sessions: usize) -> Self
pub fn max_concurrent_sync_sessions(self, sessions: usize) -> Self
Define the maximum number of concurrent sync sessions.
Sourcepub fn max_retry_attempts(self, attempts: u8) -> Self
pub fn max_retry_attempts(self, attempts: u8) -> Self
Define the maximum number of attempts at successfully completing a sync session with a specific peer.
Sourcepub fn protocol(&self) -> Arc<dyn for<'a> SyncProtocol<'a, T>>
pub fn protocol(&self) -> Arc<dyn for<'a> SyncProtocol<'a, T>>
Return the sync protocol from the given configuration.
Sourcepub fn resync(self, config: ResyncConfiguration) -> Self
pub fn resync(self, config: ResyncConfiguration) -> Self
Provide the resync configuration for the sync scheduler.
Sourcepub fn sync_queue_send_timeout(self, seconds: u64) -> Self
pub fn sync_queue_send_timeout(self, seconds: u64) -> Self
Define the maximum number of seconds to wait for sync attempt queue to have an open slot before failing.
Trait Implementations§
Source§impl<T: Clone> Clone for SyncConfiguration<T>
impl<T: Clone> Clone for SyncConfiguration<T>
Source§fn clone(&self) -> SyncConfiguration<T>
fn clone(&self) -> SyncConfiguration<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for SyncConfiguration<T>
impl<T> !RefUnwindSafe for SyncConfiguration<T>
impl<T> Send for SyncConfiguration<T>
impl<T> Sync for SyncConfiguration<T>
impl<T> Unpin for SyncConfiguration<T>
impl<T> !UnwindSafe for SyncConfiguration<T>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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