[−][src]Struct sync15::state::SetupStateMachine
Fields
client: &'a dyn SetupStorageClient
root_key: &'a KeyBundle
pgs: &'a mut PersistedGlobalState
allowed_states: Vec<&'static str>
sequence: Vec<&'static str>
engine_updates: Option<&'a HashMap<String, bool>>
interruptee: &'a dyn Interruptee
changes_needed: Option<EngineChangesNeeded>
Implementations
impl<'a> SetupStateMachine<'a>
[src]
pub fn for_full_sync(
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
engine_updates: Option<&'a HashMap<String, bool>>,
interruptee: &'a dyn Interruptee
) -> SetupStateMachine<'a>
[src]
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
engine_updates: Option<&'a HashMap<String, bool>>,
interruptee: &'a dyn Interruptee
) -> SetupStateMachine<'a>
Creates a state machine for a "classic" Sync 1.5 client that supports
all states, including uploading a fresh meta/global
and crypto/keys
after a node reassignment.
pub fn for_fast_sync(
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
engine_updates: Option<&'a HashMap<String, bool>>,
interruptee: &'a dyn Interruptee
) -> SetupStateMachine<'a>
[src]
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
engine_updates: Option<&'a HashMap<String, bool>>,
interruptee: &'a dyn Interruptee
) -> SetupStateMachine<'a>
Creates a state machine for a fast sync, which only uses locally
cached global state, and bails if meta/global
or crypto/keys
are missing or out-of-date. This is useful in cases where it's
important to get to ready as quickly as possible, like syncing before
sleep, or when conserving time or battery life.
pub fn for_readonly_sync(
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
interruptee: &'a dyn Interruptee
) -> SetupStateMachine<'a>
[src]
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
interruptee: &'a dyn Interruptee
) -> SetupStateMachine<'a>
Creates a state machine for a read-only sync, where the client can't
upload meta/global
or crypto/keys
. Useful for clients that only
sync specific collections, like Lockbox.
fn with_allowed_states(
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
interruptee: &'a dyn Interruptee,
engine_updates: Option<&'a HashMap<String, bool>>,
allowed_states: Vec<&'static str>
) -> SetupStateMachine<'a>
[src]
client: &'a dyn SetupStorageClient,
root_key: &'a KeyBundle,
pgs: &'a mut PersistedGlobalState,
interruptee: &'a dyn Interruptee,
engine_updates: Option<&'a HashMap<String, bool>>,
allowed_states: Vec<&'static str>
) -> SetupStateMachine<'a>
fn advance(&mut self, from: SetupState) -> Result<SetupState>
[src]
pub fn run_to_ready(
&mut self,
state: Option<GlobalState>
) -> Result<GlobalState>
[src]
&mut self,
state: Option<GlobalState>
) -> Result<GlobalState>
Runs through the state machine to the ready state.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SetupStateMachine<'a>
impl<'a> !Send for SetupStateMachine<'a>
impl<'a> !Sync for SetupStateMachine<'a>
impl<'a> Unpin for SetupStateMachine<'a>
impl<'a> !UnwindSafe for SetupStateMachine<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,