Skip to main content

restore_from_code

Function restore_from_code 

Source
pub async fn restore_from_code(
    code: &str,
    synced_tables: &[SyncedTable],
    migrations: &[Migration],
    expected_write_policy: WritePolicy,
    custom_s3_serial: Option<CustomS3Serial>,
    custom_s3_exact_slots: Option<CustomS3ExactSlots>,
    key_custody: KeyCustody,
    identity_custody: IdentityCustody,
    oauth_tokens: Option<OAuthTokens>,
    cloudkit_ops: Option<Arc<dyn CloudKitOps>>,
    layout: &StoreLayout,
    clock: ClockRef,
    ids: IdRef,
    on_status: impl Fn(&str),
    cancel: &Receiver<bool>,
) -> Result<Config, BootstrapError>
Expand description

Restore a store from a restore code string.

Decodes the restore code, fills a RestoreSource from its join info plus the caller-supplied OAuth tokens and CloudKit driver, imports the signing key, and delegates to restore_from_cloud.