[−][src]Crate sync15
Modules
bso_record | |
changeset | |
client | |
clients | |
coll_state | |
collection_keys | |
error | |
key_bundle | |
migrate_state | |
record_types | |
request | |
state | |
status | |
sync | |
sync_multiple | |
telemetry | Note: this mostly just reexports the things from sync15_traits::telemetry. |
token | |
util |
Structs
BsoRecord | |
CollState | Holds state for a collection. In general, only the CollState is needed to sync a collection (but a valid GlobalState is needed to obtain a CollState) |
CollSyncIds | |
CollectionKeys | |
CollectionRequest | |
EncryptedPayload | |
Error | |
GlobalState | Holds global Sync state, including server upload limits, the
last-fetched collection modified times, |
KeyBundle | |
MemoryCachedState | Info we want callers to store in memory for us so that subsequent syncs are faster. This should never be persisted to storage as it holds sensitive information, such as the sync decryption keys. |
Payload | Represents the decrypted payload in a Bso. Provides a minimal layer of type safety to avoid double-encrypting. |
RecordChangeset | |
ServerTimestamp | Typesafe way to manage server timestamps without accidentally mixing them up with local ones. |
SetupStateMachine | |
Sync15StorageClient | |
Sync15StorageClientInit | |
SyncRequestInfo | This is essentially a bag of information that the sync manager knows, but otherwise we won't. It should probably be rethought if it gains many more fields. |
SyncResult | The result of a sync request. This too is from the "sync manager", but only has a fraction of the things it will have when we actually build that. |
Enums
ErrorKind | |
ServiceStatus | The general status of sync - should probably be moved to the "sync manager" once we have one! |
StoreSyncAssociation | Defines how a store is associated with Sync. |
Sync15ClientResponse | A response from a GET request on a Sync15StorageClient, encapsulating all the variants users of this client needs to care about. |
Traits
SetupStorageClient | A trait containing the methods required to run through the setup state machine. This is factored out into a separate trait to make mocking easier. |
Store | Low-level store functionality. Stores that need custom reconciliation logic should use this. |
Functions
extract_v1_state | Given a string persisted as our old GlobalState V1 struct, extract out the sync IDs for the collection, plus a string which should be used as the new "global persisted state" (which holds the declined engines). Returns (None, None) in early error cases (eg, invalid JSON, wrong schema version etc). Otherwise, you can expect the returned global state to be Some, even if the CollSyncIds is None (which can happen if the engine is missing, or flagged for reset) |
sync_multiple | Sync multiple stores |
sync_multiple_with_command_processor | Like |
synchronize |
Type Definitions
CleartextBso | |
EncryptedBso | |
IncomingChangeset | |
OutgoingChangeset | |
Result |