[−][src]Struct places::bookmark_sync::store::BookmarksStore
Fields
db: &'a PlacesDb
interruptee: &'a SqlInterruptScope
Implementations
impl<'a> BookmarksStore<'a>
[src]
pub fn new(db: &'a PlacesDb, interruptee: &'a SqlInterruptScope) -> Self
[src]
fn stage_incoming(
&self,
inbound: IncomingChangeset,
incoming_telemetry: &mut EngineIncoming
) -> Result<ServerTimestamp>
[src]
&self,
inbound: IncomingChangeset,
incoming_telemetry: &mut EngineIncoming
) -> Result<ServerTimestamp>
fn has_changes(&self) -> Result<bool>
[src]
fn update_local_items_in_places<'t>(
&self,
now: Timestamp,
ops: &CompletionOps<'t>
) -> Result<()>
[src]
&self,
now: Timestamp,
ops: &CompletionOps<'t>
) -> Result<()>
Builds a temporary table with the merge states of all nodes in the merged tree, then updates the local tree to match the merged tree.
Conceptually, we examine the merge state of each item, and either leave the item unchanged, upload the local side, apply the remote side, or apply and then reupload the remote side with a new structure.
fn apply_remote_items(&self, now: Timestamp) -> Result<()>
[src]
fn stage_items_to_upload(
&self,
upload_items: &[UploadItem<'_>],
upload_tombstones: &[UploadTombstone<'_>]
) -> Result<()>
[src]
&self,
upload_items: &[UploadItem<'_>],
upload_tombstones: &[UploadTombstone<'_>]
) -> Result<()>
Stores a snapshot of all locally changed items in a temporary table for upload. This is called from within the merge transaction, to ensure that changes made during the sync don't cause us to upload inconsistent records.
Conceptually, itemsToUpload
is a transient "view" of locally changed
items. The local change counter is the persistent record of items that
we need to upload, so, if upload is interrupted or fails, we'll stage
the items again on the next sync.
fn fetch_outgoing_records(
&self,
timestamp: ServerTimestamp
) -> Result<OutgoingChangeset>
[src]
&self,
timestamp: ServerTimestamp
) -> Result<OutgoingChangeset>
Inflates Sync records for all staged outgoing items.
fn push_synced_items(
&self,
uploaded_at: ServerTimestamp,
records_synced: Vec<SyncGuid>
) -> Result<()>
[src]
&self,
uploaded_at: ServerTimestamp,
records_synced: Vec<SyncGuid>
) -> Result<()>
Decrements the change counter, updates the sync status, and cleans up tombstones for successfully synced items. Sync calls this method at the end of each bookmark sync.
pub(crate) fn update_frecencies(&self) -> Result<()>
[src]
Trait Implementations
impl<'a> Store for BookmarksStore<'a>
[src]
fn collection_name(&self) -> Cow<'static, str>
[src]
fn apply_incoming(
&self,
inbound: Vec<IncomingChangeset>,
telem: &mut Engine
) -> Result<OutgoingChangeset>
[src]
&self,
inbound: Vec<IncomingChangeset>,
telem: &mut Engine
) -> Result<OutgoingChangeset>
fn sync_finished(
&self,
new_timestamp: ServerTimestamp,
records_synced: Vec<SyncGuid>
) -> Result<()>
[src]
&self,
new_timestamp: ServerTimestamp,
records_synced: Vec<SyncGuid>
) -> Result<()>
fn get_collection_requests(
&self,
server_timestamp: ServerTimestamp
) -> Result<Vec<CollectionRequest>>
[src]
&self,
server_timestamp: ServerTimestamp
) -> Result<Vec<CollectionRequest>>
fn get_sync_assoc(&self) -> Result<StoreSyncAssociation>
[src]
fn reset(&self, assoc: &StoreSyncAssociation) -> Result<()>
[src]
fn wipe(&self) -> Result<()>
[src]
Erases all local items. Unlike reset
, this keeps all synced items
until the next sync, when they will be replaced with tombstones. This
also preserves the sync ID and last sync time.
Conceptually, the next sync will merge an empty local tree, and a full remote tree.
fn prepare_for_sync(&self, _get_client_data: &dyn Fn()) -> Result<(), Error>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for BookmarksStore<'a>
impl<'a> !Send for BookmarksStore<'a>
impl<'a> !Sync for BookmarksStore<'a>
impl<'a> Unpin for BookmarksStore<'a>
impl<'a> !UnwindSafe for BookmarksStore<'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>,