[][src]Enum webext_storage::sync::incoming::IncomingState

[]
pub enum IncomingState {
    IncomingOnlyData {
        ext_id: String,
        data: Map<String, Value>,
    },
    IncomingOnlyTombstone,
    HasLocal {
        ext_id: String,
        incoming: DataState,
        local: DataState,
    },
    NotLocal {
        ext_id: String,
        incoming: DataState,
        mirror: DataState,
    },
    Everywhere {
        ext_id: String,
        incoming: DataState,
        mirror: DataState,
        local: DataState,
    },
}
[]

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.

Variants

IncomingOnlyData
[]

There's an incoming item, but data for that extension doesn't exist either in our local data store or in the local mirror. IOW, this is the very first time we've seen this extension.

[]

Fields of IncomingOnlyData

ext_id: Stringdata: Map<String, Value>
IncomingOnlyTombstone
[]

An incoming tombstone that doesn't exist locally. Because tombstones don't carry the ext-id, it means it's not in our mirror. We are just going to ignore it, but we track the state for consistency.

HasLocal
[]

There's an incoming item and we have data for the same extension in our local store - but not in our mirror. This should be relatively uncommon as it means:

[]

Fields of HasLocal

ext_id: Stringincoming: DataStatelocal: DataState
NotLocal
[]

There's an incoming item and there's an item for the same extension in the mirror. The addon probably doesn't exist locally, or if it does, the last time we synced we synced the deletion of all data.

[]

Fields of NotLocal

ext_id: Stringincoming: DataStatemirror: DataState
Everywhere
[]

This will be the most common "incoming" case - there's data incoming, in the mirror and in the local store for an addon.

[]

Fields of Everywhere

ext_id: Stringincoming: DataStatemirror: DataStatelocal: DataState

Trait Implementations

impl Debug for IncomingState[src][+]

impl PartialEq<IncomingState> for IncomingState[src][+]

impl StructuralPartialEq for IncomingState[src]

Auto Trait Implementations

impl RefUnwindSafe for IncomingState

impl Send for IncomingState

impl Sync for IncomingState

impl Unpin for IncomingState

impl UnwindSafe for IncomingState

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>, 
[+]