pub async fn load(
        lifetime: AccountLifetime,
        context_proxy: AccountHandlerContextProxy,
        lock_request_sender: lock_request::Sender,
        inspect_parent: &Node,
    ) -> Result<Account, AccountManagerError> {
        let account_dir = match lifetime {
            AccountLifetime::Persistent { ref account_dir } => account_dir,
            AccountLifetime::Ephemeral => {
                warn!(concat!(
                    "Attempting to load an ephemeral account from disk. This is not a ",
                    "supported operation."
                ));
                return Err(AccountManagerError::new(ApiError::Internal));
            }
        };
        let stored_account = StoredAccount::load(account_dir)?;
        let local_persona_id = stored_account.get_default_persona_id().clone();
        let global_account_id = stored_account.get_global_account_id().clone();
        Self::new(
            local_persona_id,
            global_account_id,
            lifetime,
            context_proxy,
            lock_request_sender,
            inspect_parent,
        )
        .await
    }
/// Loads an existing Fuchsia account from disk.
Loads an existing Fuchsia account from disk.
Loads an existing Fuchsia account from disk .
pub async fn load(
        lifetime: AccountLifetime,
        context_proxy: AccountHandlerContextProxy,
        lock_request_sender: lock_request::Sender,
        inspect_parent: &Node,
    ) -> Result<Account, AccountManagerError> {
        let account_dir = match lifetime {
            AccountLifetime::Persistent { ref account_dir } => account_dir,
            AccountLifetime::Ephemeral => {
                warn!(concat!(
                    "Attempting to load an ephemeral account from disk. This is not a ",
                    "supported operation."
                ));
                return Err(AccountManagerError::new(ApiError::Internal));
            }
        };
        let stored_account = StoredAccount::load(account_dir)?;
        let local_persona_id = stored_account.get_default_persona_id().clone();
        let global_account_id = stored_account.get_global_account_id().clone();
        Self::new(
            local_persona_id,
            global_account_id,
            lifetime,
            context_proxy,
            lock_request_sender,
            inspect_parent,
        )
        .await
    }
pub async fn load ( lifetime : AccountLifetime , context_proxy : AccountHandlerContextProxy , lock_request_sender : lock_request :: Sender , inspect_parent : & Node , ) -> Result < Account , AccountManagerError > { let account_dir = match lifetime { AccountLifetime :: Persistent { ref account_dir } => account_dir , AccountLifetime :: Ephemeral => { warn ! ( concat ( " " " " ) ) ; return Err ( AccountManagerError :: new ( ApiError :: Internal ) ) ; } } ; let stored_account = StoredAccount :: load ( account_dir ) ? ; let local_persona_id = stored_account . get_default_persona_id ( ) . clone ( ) ; let global_account_id = stored_account . get_global_account_id ( ) . clone ( ) ; Self :: new ( local_persona_id , global_account_id , lifetime , context_proxy , lock_request_sender , inspect_parent , ) . await }
Loads an existing Fuchsia account from disk.
Loads an existing Fuchsia account from disk .
lifetime
AccountLifetime
context_proxy
AccountHandlerContextProxy
lock_request_sender
lock_request::Sender
inspect_parent
&Node
lifetime
AccountLifetime
context_proxy
AccountHandlerContextProxy
lock_request_sender
lock_request::Sender
inspect_parent
&Node