[][src]Struct places::bookmark_sync::store::Merger

pub(crate) struct Merger<'a> {
    store: &'a BookmarksStore<'a>,
    remote_time: ServerTimestamp,
    local_time: Timestamp,
    external_transaction: bool,
    telem: Option<&'a mut Engine>,
    global_change_tracker: GlobalChangeCounterTracker,
}

Fields

store: &'a BookmarksStore<'a>remote_time: ServerTimestamplocal_time: Timestampexternal_transaction: booltelem: Option<&'a mut Engine>global_change_tracker: GlobalChangeCounterTracker

Implementations

impl<'a> Merger<'a>[src]

pub(crate) fn new(
    store: &'a BookmarksStore<'_>,
    remote_time: ServerTimestamp
) -> Self
[src]

pub(crate) fn with_telemetry(
    store: &'a BookmarksStore<'_>,
    remote_time: ServerTimestamp,
    telem: &'a mut Engine
) -> Self
[src]

pub(crate) fn set_external_transaction(&mut self, v: bool)[src]

Prevent (or re-enable, in principal) using begin_transaction in apply().

The assumption is that if you call this, someone higher up the call_stack is managing the transaction at that point.

pub(crate) fn merge(&mut self) -> Result<()>[src]

fn prepare(&self) -> Result<()>[src]

Prepares synced bookmarks for merging.

fn local_row_to_item(&self, row: &Row<'_>) -> Result<(Item, Option<Content>)>[src]

Creates a local tree item from a row in the localItems CTE.

fn remote_row_to_item(&self, row: &Row<'_>) -> Result<(Item, Option<Content>)>[src]

Creates a remote tree item from a row in moz_bookmarks_synced.

Trait Implementations

impl<'a> Store for Merger<'a>[src]

type Ok = ()

The type returned from a successful merge.

type Error = Error

The type returned in the event of a store error.

fn fetch_local_tree(&self) -> Result<Tree>[src]

Builds a fully rooted, consistent tree from all local items and tombstones.

fn fetch_remote_tree(&self) -> Result<Tree>[src]

Builds a fully rooted tree from all synced items and tombstones.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Merger<'a>

impl<'a> !Send for Merger<'a>

impl<'a> !Sync for Merger<'a>

impl<'a> Unpin for Merger<'a>

impl<'a> !UnwindSafe for Merger<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,