[][src]Module webext_storage::sync::incoming

Enums

DataState

The state data can be in. Could be represented as Option, but this is clearer and independent of how the data is stored.

IncomingAction

This is the set of actions we know how to take locally for incoming records. Which one depends on the IncomingState. Every state which updates also records the set of changes we should notify

IncomingState

The "state" we find ourselves in when considering an incoming/staging record. This "state" is the input to calculating the IncomingAction and carries all the data we need to make the required local changes.

Functions

apply_actions
changes_for_new_incoming
get_incoming

Get the items we need to process from the staging table. Return details about the item and the state of that item, ready for processing.

insert_changes
json_map_from_row
plan_incoming

Takes the state of an item and returns the action we should take for it.

stage_incoming

The first thing we do with incoming items is to "stage" them in a temp table. The actual processing is done via this table.