[−][src]Struct rkv::migrator::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]
src_env: S,
dst_env: D
) -> Result<(), MigrateError> where
S: Deref<Target = Rkv<LmdbEnvironment>>,
D: Deref<Target = Rkv<SafeModeEnvironment>>,
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]
path: &Path,
build: F,
dst_env: D
) -> Result<(), MigrateError> where
F: FnOnce(Lmdb) -> Lmdb,
D: Deref<Target = Rkv<SafeModeEnvironment>>,
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]
src_env: S,
dst_env: D
) -> Result<(), MigrateError> where
S: Deref<Target = Rkv<SafeModeEnvironment>>,
D: Deref<Target = Rkv<LmdbEnvironment>>,
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]
path: &Path,
build: F,
dst_env: D
) -> Result<(), MigrateError> where
F: FnOnce(SafeMode) -> SafeMode,
D: Deref<Target = Rkv<LmdbEnvironment>>,
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
impl RefUnwindSafe for Migrator
impl Send for Migrator
impl Sync for Migrator
impl Unpin for Migrator
impl UnwindSafe for Migrator
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>,