restore_from_code

Function restore_from_code 

Source
pub async fn restore_from_code(
    code: &str,
    oauth_tokens: Option<OAuthTokens>,
    cloudkit_ops: Option<Arc<dyn CloudKitOps>>,
    app_dir: &Path,
    clock: ClockRef,
    ids: IdRef,
    make_blob_plan: impl Fn(&LibraryDir) -> Box<dyn BlobPlan>,
    on_status: impl Fn(&str),
) -> Result<Config, RestoreError>
Expand description

Restore a library from a restore code string.

Decodes the restore code, converts provider → RestoreSource (adding OAuth tokens for providers that need them), imports the signing key, and delegates to restore_from_cloud.