pub struct MigrationManager { /* private fields */ }Expand description
Manages and applies migrations to raw settings data.
Implementations§
Source§impl MigrationManager
impl MigrationManager
pub fn new(current_version: u32) -> Self
pub fn add(self, migration: impl Migration + 'static) -> Self
pub fn add_key_rename( self, from_ver: u32, to_ver: u32, old_key: impl Into<String>, new_key: impl Into<String>, ) -> Self
pub fn add_key_deletion( self, from_ver: u32, to_ver: u32, keys: Vec<String>, ) -> Self
pub fn migrate(&self, data: &mut Value) -> MigrationResult
pub fn stored_version(data: &Value) -> u32
Auto Trait Implementations§
impl !RefUnwindSafe for MigrationManager
impl !UnwindSafe for MigrationManager
impl Freeze for MigrationManager
impl Send for MigrationManager
impl Sync for MigrationManager
impl Unpin for MigrationManager
impl UnsafeUnpin for MigrationManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more