pub struct BackgroundOptions {
pub program: String,
pub network: Options,
pub known: Vec<([u8; 32], Vec<SocketAddr>)>,
pub quiet: Duration,
pub appear_wait: Duration,
pub check: Pace,
}Expand description
How a program holds the sync role in the background: as Holding says, with what it
keeps of its own.
Fields§
§program: StringThe program, as the records name it, such as Passwords.
network: OptionsHow its endpoint starts.
known: Vec<([u8; 32], Vec<SocketAddr>)>Where other replicas are, found other than on the network, as in tests.
quiet: DurationHow long it waits after new changes before it syncs them.
appear_wait: DurationHow long it waits at most after another replica appears before it connects.
check: PaceHow it paces its checks of the replica’s copies.
Implementations§
Source§impl BackgroundOptions
impl BackgroundOptions
Sourcepub fn new(program: &str, network: Options) -> Self
pub fn new(program: &str, network: Options) -> Self
For program, with its endpoint as network says, the waits of
Holding::QUIET and Holding::APPEAR_WAIT, and checks at Pace::DEFAULT.
Trait Implementations§
Source§impl Clone for BackgroundOptions
impl Clone for BackgroundOptions
Auto Trait Implementations§
impl Forget for BackgroundOptions
impl Freeze for BackgroundOptions
impl Move for BackgroundOptions
impl RefUnwindSafe for BackgroundOptions
impl Send for BackgroundOptions
impl Sync for BackgroundOptions
impl Unpin for BackgroundOptions
impl UnsafeUnpin for BackgroundOptions
impl UnwindSafe for BackgroundOptions
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