pub struct Background { /* private fields */ }Expand description
A thread that holds the sync role of a replica in the background, or waits for it, until this is stopped or dropped.
Implementations§
Source§impl Background
impl Background
Sourcepub fn start<R: CryptoRng + Send + 'static>(
closed: Closed,
options: BackgroundOptions,
now: impl Fn() -> u64 + Send + Sync + 'static,
rng: impl Fn() -> R + Send + Sync + 'static,
) -> Self
pub fn start<R: CryptoRng + Send + 'static>( closed: Closed, options: BackgroundOptions, now: impl Fn() -> u64 + Send + Sync + 'static, rng: impl Fn() -> R + Send + Sync + 'static, ) -> Self
Starts a thread that takes the sync role of closed’s replica, as soon as no other
program holds it, and holds it as hold does, as options say, until stopped:
again after holding it failed, a while later. now is the wall clock, and rng
makes randomness for each thread.
Sourcepub fn state(&self) -> BackgroundState
pub fn state(&self) -> BackgroundState
What it does now.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Background
impl !UnwindSafe for Background
impl Forget for Background
impl Freeze for Background
impl Move for Background
impl Send for Background
impl Sync for Background
impl Unpin for Background
impl UnsafeUnpin for Background
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