Struct radicle_cli::node::SyncSettings
source · pub struct SyncSettings {
pub replicas: usize,
pub seeds: BTreeSet<NodeId>,
pub timeout: Duration,
}Expand description
Repository sync settings.
Fields§
§replicas: usizeSync with at least N replicas.
seeds: BTreeSet<NodeId>Sync with the given list of seeds.
timeout: DurationHow long to wait for syncing to complete.
Implementations§
source§impl SyncSettings
impl SyncSettings
sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Set sync timeout. Defaults to DEFAULT_SYNC_TIMEOUT.
sourcepub fn with_profile(self, profile: &Profile) -> Self
pub fn with_profile(self, profile: &Profile) -> Self
Use profile to populate sync settings, by adding preferred seeds if no seeds are specified, and removing the local node from the set.
Trait Implementations§
source§impl Clone for SyncSettings
impl Clone for SyncSettings
source§fn clone(&self) -> SyncSettings
fn clone(&self) -> SyncSettings
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 moresource§impl Debug for SyncSettings
impl Debug for SyncSettings
source§impl Default for SyncSettings
impl Default for SyncSettings
source§impl PartialEq for SyncSettings
impl PartialEq for SyncSettings
source§fn eq(&self, other: &SyncSettings) -> bool
fn eq(&self, other: &SyncSettings) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for SyncSettings
impl StructuralPartialEq for SyncSettings
Auto Trait Implementations§
impl Freeze for SyncSettings
impl RefUnwindSafe for SyncSettings
impl Send for SyncSettings
impl Sync for SyncSettings
impl Unpin for SyncSettings
impl UnwindSafe for SyncSettings
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.