Enumerations
The following enumerations are available globally.
-
Represents the progress state of a migration operation.
MigrationProgressis an enum that tracks the various states of a migration process. It is emitted as anAsyncStreamfrom a migration’sstart()method, allowing consumers to monitor migration progress, handle errors, and provide user feedback.Progress Flow Sequence
A typical migration follows this progress sequence:
- started — Migration begins.
- inProgress — For each step being executed.
- stepCompleted — After each step completes successfully.
- success — When all steps complete, OR
- error — If any step fails with an exception.
Usage Example
for await progress in migrationStream { switch progress { case .started: showProgressIndicator() case .inProgress(let step, let current, let total): updateProgressBar(current: current, total: total) updateStatus("Step \(current)/\(total): \(step)") case .stepCompleted(let step): logger.i("Completed step: \(step)") case .success(let message): hideProgressIndicator() showSuccessMessage(message) case .error(let step, let error): hideProgressIndicator() showErrorDialog("Migration failed at step: \(step)", error: error) } }Error Handling
When a migration step throws an exception, the migration process stops and emits an
error(step:underlyingError:)event. The error contains both the exception and the step where the failure occurred, enabling precise error handling and debugging.See moreSee also
MigrationStepDeclaration
Swift
public enum MigrationProgress : Sendable
-
Errors that can occur during URI parsing.
See moreDeclaration
Swift
public enum UriParseError : Error, LocalizedError, Sendable -
Supported URI Schemes for MFA
See moreDeclaration
Swift
public enum UriScheme : String, CaseIterable, Sendable -
Errors that can occur during URI parsing.
See moreDeclaration
Swift
public enum Base64Error : Error, LocalizedError, Sendable
View on GitHub
Enumerations Reference