/// Process a single AccountManager FIDL request and send a reply.
Process a single AccountManager FIDL request and send a reply.
Process a single AccountManager FIDL request and send a reply .
async fn handle_request(&self, request: AccountManagerRequest) -> Result<(), Error> {
        match request {
            AccountManagerRequest::GetAccountIds { responder } => {
                let account_ids = self.get_account_ids().await?;
                responder.send(&account_ids).context("sending GetAccountIds repsonse")?;
            }
            AccountManagerRequest::DeprecatedGetAccount { id, password, account, responder } => {
                let mut resp = self.get_account(id, password, account).await;
                responder.send(&mut resp).context("sending DeprecatedGetAccount response")?;
            }
            AccountManagerRequest::DeprecatedProvisionNewAccount {
                password: _,
                metadata: _,
                account: _,
                responder,
            } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder
                    .send(&mut resp)
                    .context("sending DeprecatedProvisionNewAccount response")?;
            }
            AccountManagerRequest::GetAccountAuthStates { scenario: _, responder } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder.send(&mut resp).context("sending GetAccountAuthStates response")?;
            }
            AccountManagerRequest::GetAccountMetadata { id: _, responder } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder.send(&mut resp).context("sending GetAccountMetadata response")?;
            }
            AccountManagerRequest::GetAccount {
                id: _,
                context_provider: _,
                account: _,
                responder,
            } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder.send(&mut resp).context("sending GetAccount response")?;
            }
            AccountManagerRequest::RegisterAccountListener {
                listener: _,
                options: _,
                responder,
            } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder.send(&mut resp).context("sending RegisterAccountListener response")?;
            }
            AccountManagerRequest::RemoveAccount { id: _, force: _, responder } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder.send(&mut resp).context("sending RemoveAccount response")?;
            }
            AccountManagerRequest::ProvisionNewAccount {
                lifetime: _,
                auth_mechanism_id: _,
                responder,
            } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder.send(&mut resp).context("sending ProvisionNewAccount response")?;
            }
            AccountManagerRequest::GetAuthenticationMechanisms { responder } => {
                let mut resp = Err(faccount::Error::UnsupportedOperation);
                responder
                    .send(&mut resp)
                    .context("sending GetAuthenticationMechanisms response")?;
            }
        }
        Ok(())
    }
async fn handle_request ( & self , request : AccountManagerRequest ) -> Result < ( ) , Error > { match request { AccountManagerRequest :: GetAccountIds { responder } => { let account_ids = self . get_account_ids ( ) . await ? ; responder . send ( & account_ids ) . context ( " " ) ? ; } AccountManagerRequest :: DeprecatedGetAccount { id , password , account , responder } => { let mut resp = self . get_account ( id , password , account ) . await ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: DeprecatedProvisionNewAccount { password : _ , metadata : _ , account : _ , responder , } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: GetAccountAuthStates { scenario : _ , responder } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: GetAccountMetadata { id : _ , responder } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: GetAccount { id : _ , context_provider : _ , account : _ , responder , } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: RegisterAccountListener { listener : _ , options : _ , responder , } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: RemoveAccount { id : _ , force : _ , responder } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: ProvisionNewAccount { lifetime : _ , auth_mechanism_id : _ , responder , } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } AccountManagerRequest :: GetAuthenticationMechanisms { responder } => { let mut resp = Err ( faccount :: Error :: UnsupportedOperation ) ; responder . send ( & mut resp ) . context ( " " ) ? ; } } Ok ( ( ) ) }
Process a single AccountManager FIDL request and send a reply.
Process a single AccountManager FIDL request and send a reply .
&self
request
AccountManagerRequest