pub struct DefaultStateMigrator { /* private fields */ }Expand description
Default pure background state migrator supporting identity pass-through and explicit key renames.
Implementations§
Source§impl DefaultStateMigrator
Configuration helpers for DefaultStateMigrator.
impl DefaultStateMigrator
Configuration helpers for DefaultStateMigrator.
Source§impl DefaultStateMigrator
impl DefaultStateMigrator
pub fn get_field_renames( &self, ) -> &BTreeMap<(u32, u32), BTreeMap<String, String>>
pub fn get_mut_field_renames( &mut self, ) -> &mut BTreeMap<(u32, u32), BTreeMap<String, String>>
pub fn set_field_renames( &mut self, val: BTreeMap<(u32, u32), BTreeMap<String, String>>, ) -> &mut Self
pub fn get_default_additions( &self, ) -> &BTreeMap<(u32, u32), BTreeMap<String, String>>
pub fn get_mut_default_additions( &mut self, ) -> &mut BTreeMap<(u32, u32), BTreeMap<String, String>>
pub fn set_default_additions( &mut self, val: BTreeMap<(u32, u32), BTreeMap<String, String>>, ) -> &mut Self
Trait Implementations§
Source§impl Clone for DefaultStateMigrator
impl Clone for DefaultStateMigrator
Source§impl Debug for DefaultStateMigrator
impl Debug for DefaultStateMigrator
Source§impl Default for DefaultStateMigrator
impl Default for DefaultStateMigrator
impl Eq for DefaultStateMigrator
Source§impl PartialEq for DefaultStateMigrator
impl PartialEq for DefaultStateMigrator
Source§impl StateMigrator for DefaultStateMigrator
Pure background migration logic for DefaultStateMigrator.
impl StateMigrator for DefaultStateMigrator
Pure background migration logic for DefaultStateMigrator.
Source§fn migrate(
&self,
from_schema: u32,
to_schema: u32,
snapshot: &ComponentUiStateSnapshot,
) -> Result<ComponentUiStateSnapshot, DynamicReleaseError>
fn migrate( &self, from_schema: u32, to_schema: u32, snapshot: &ComponentUiStateSnapshot, ) -> Result<ComponentUiStateSnapshot, DynamicReleaseError>
Purely transforms snapshot from from_schema to to_schema, refusing to drop unmapped user drafts.
§Arguments
u32- Source schema version.u32- Target schema version.&ComponentUiStateSnapshot- Source immutable UI state snapshot.
§Returns
Result<ComponentUiStateSnapshot, DynamicReleaseError>- Migrated state snapshot or failure.
impl StructuralPartialEq for DefaultStateMigrator
Auto Trait Implementations§
impl Forget for DefaultStateMigrator
impl Freeze for DefaultStateMigrator
impl Move for DefaultStateMigrator
impl RefUnwindSafe for DefaultStateMigrator
impl Send for DefaultStateMigrator
impl Sync for DefaultStateMigrator
impl Unpin for DefaultStateMigrator
impl UnsafeUnpin for DefaultStateMigratorwhere
*const LeafNode<(u32, u32), BTreeMap<String, String>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<((u32, u32), BTreeMap<String, String>)>>: UnsafeUnpin,
impl UnwindSafe for DefaultStateMigrator
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