pub fn apply_pending_migrations<T>(
account: &AccountView,
current_epoch: u32,
) -> Result<u32, ProgramError>Expand description
Apply all pending migrations needed to bring the account at
current_epoch up to AccountLayout::SCHEMA_EPOCH.
Returns Ok(applied_count) if everything up-migrated cleanly.
Returns Err(MigrationMismatch) if the declared chain is
incomplete, non-monotonic, or doesn’t start at current_epoch.
Returns Err(MigrationRejected) if a user migrator function
returned an error.