[][src]Struct rkv::migrator::Migrator

pub struct Migrator;

Implementations

impl Migrator[src]

pub fn migrate_lmdb_to_safe_mode<S, D>(
    src_env: S,
    dst_env: D
) -> Result<(), MigrateError> where
    S: Deref<Target = Rkv<LmdbEnvironment>>,
    D: Deref<Target = Rkv<SafeModeEnvironment>>, 
[src]

Migrate all data in all of databases from the source environment to the destination environment. This includes all key/value pairs in the main database that aren't metadata about subdatabases and all key/value pairs in all subdatabases.

Other backend-specific metadata such as map size or maximum databases left intact on the given environments.

The destination environment should be empty of data, otherwise an error is returned.

pub fn auto_migrate_lmdb_to_safe_mode<F, D>(
    path: &Path,
    build: F,
    dst_env: D
) -> Result<(), MigrateError> where
    F: FnOnce(Lmdb) -> Lmdb,
    D: Deref<Target = Rkv<SafeModeEnvironment>>, 
[src]

Same as the other migration methods, but automatically attempts to open the source environment, ignores it if it doesn't exist or if it's empty, and finally attempts to delete all of its supporting files.

pub fn migrate_safe_mode_to_lmdb<S, D>(
    src_env: S,
    dst_env: D
) -> Result<(), MigrateError> where
    S: Deref<Target = Rkv<SafeModeEnvironment>>,
    D: Deref<Target = Rkv<LmdbEnvironment>>, 
[src]

Migrate all data in all of databases from the source environment to the destination environment. This includes all key/value pairs in the main database that aren't metadata about subdatabases and all key/value pairs in all subdatabases.

Other backend-specific metadata such as map size or maximum databases left intact on the given environments.

The destination environment should be empty of data, otherwise an error is returned.

pub fn auto_migrate_safe_mode_to_lmdb<F, D>(
    path: &Path,
    build: F,
    dst_env: D
) -> Result<(), MigrateError> where
    F: FnOnce(SafeMode) -> SafeMode,
    D: Deref<Target = Rkv<LmdbEnvironment>>, 
[src]

Same as the other migration methods, but automatically attempts to open the source environment, ignores it if it doesn't exist or if it's empty, and finally attempts to delete all of its supporting files.

Auto Trait Implementations

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.