[−][src]Struct sync15::clients::engine::Engine
Fields
command_processor: &'a dyn CommandProcessor
interruptee: &'a dyn Interruptee
recent_clients: HashMap<String, RemoteClient>
Implementations
impl<'a> Engine<'a>
[src]
pub fn new<'b>(
command_processor: &'b dyn CommandProcessor,
interruptee: &'b dyn Interruptee
) -> Engine<'b>
[src]
command_processor: &'b dyn CommandProcessor,
interruptee: &'b dyn Interruptee
) -> Engine<'b>
Creates a new clients engine that delegates to the given command processor to apply incoming commands.
pub fn sync(
&mut self,
storage_client: &Sync15StorageClient,
global_state: &GlobalState,
root_sync_key: &KeyBundle,
should_refresh_client: bool
) -> Result<()>
[src]
&mut self,
storage_client: &Sync15StorageClient,
global_state: &GlobalState,
root_sync_key: &KeyBundle,
should_refresh_client: bool
) -> Result<()>
Syncs the clients collection. This works a little differently than other collections:
- It can't be disabled or declined.
- The sync ID and last sync time aren't meaningful, since we always
fetch all client records on every sync. As such, the
LocalCollStateMachine
that we use for other engines doesn't apply to it. - It doesn't persist state directly, but relies on the sync manager to persist device settings, and process commands.
- Failing to sync the clients collection is fatal, and aborts the sync.
For these reasons, we implement this engine directly in the sync15
crate, and provide a specialized sync
method instead of implementing
sync15::Store
.
fn fetch_incoming(
&self,
storage_client: &Sync15StorageClient,
coll_state: &mut CollState
) -> Result<IncomingChangeset>
[src]
&self,
storage_client: &Sync15StorageClient,
coll_state: &mut CollState
) -> Result<IncomingChangeset>
pub fn local_client_id(&self) -> String
[src]
pub fn get_client_data(&self) -> ClientData
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Engine<'a>
impl<'a> !Send for Engine<'a>
impl<'a> !Sync for Engine<'a>
impl<'a> Unpin for Engine<'a>
impl<'a> !UnwindSafe for Engine<'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>,