[][src]Struct webext_storage::migration::MigrationInfo

pub struct MigrationInfo {
    pub entries: usize,
    pub entries_successful: usize,
    pub extensions: usize,
    pub extensions_successful: usize,
    pub open_failure: bool,
}

Fields

entries: usize

The number of entries (rows in the original table) we attempted to migrate. Zero if there was some error in computing this number.

Note that for the original table, a single row stores a single preference for one extension. That is, if you view the set of preferences for a given extension as a HashMap (as we do), it would be a single entry/key-value-pair in the map.

entries_successful: usize

The number of records we successfully migrated (equal to entries for entirely successful migrations).

extensions: usize

The number of extensions (distinct extension ids) in the original table.

extensions_successful: usize

The number of extensions we successfully migrated

open_failure: bool

True iff we failed to open the source DB at all.

Implementations

impl MigrationInfo[src]

fn open_failure() -> Self[src]

Returns a MigrationInfo indicating that we failed to read any rows due to some error case (e.g. the database open failed, or some other very early read error).

const META_KEY: &'static str[src]

pub(crate) fn store(&self, conn: &Connection) -> Result<()>[src]

Store self in the provided database under Self::META_KEY.

pub(crate) fn take(tx: &Transaction<'_>) -> Result<Option<Self>>[src]

Get the MigrationInfo stored under Self::META_KEY (if any) out of the DB, and delete it.

Trait Implementations

impl Clone for MigrationInfo[src]

impl Debug for MigrationInfo[src]

impl Default for MigrationInfo[src]

impl<'de> Deserialize<'de> for MigrationInfo[src]

impl PartialEq<MigrationInfo> for MigrationInfo[src]

impl Serialize for MigrationInfo[src]

impl StructuralPartialEq for MigrationInfo[src]

Auto Trait Implementations

impl RefUnwindSafe for MigrationInfo

impl Send for MigrationInfo

impl Sync for MigrationInfo

impl Unpin for MigrationInfo

impl UnwindSafe for MigrationInfo

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,