fn handle_account_state_response(
    future_resp: impl Future<Item = UpdateToLatestLedgerResponse, Error = failure::Error>,
) -> Result<(u64, AccountStatus)> {
    let mut response = future_resp.wait()?;
    let account_state_proof = response
        .response_items
        .remove(0)
        .into_get_account_state_response()?;
    if let Some(account_state_blob) = account_state_proof.blob {
        let account_resource = get_account_resource_or_default(&Some(account_state_blob))?;
        Ok((account_resource.sequence_number(), AccountStatus::Persisted))
    } else {
        bail!("failed to get account state because account doesn't exist")
    }
}
/// Wait and process the response of account state request.
/// For valid response, return account's sequence number and status.
Wait and process the response of account state request.
For valid response, return account's sequence number and status.
Wait and process the response of account state request . For valid response return account ' s sequence number and status .
fn handle_account_state_response(
    future_resp: impl Future<Item = UpdateToLatestLedgerResponse, Error = failure::Error>,
) -> Result<(u64, AccountStatus)> {
    let mut response = future_resp.wait()?;
    let account_state_proof = response
        .response_items
        .remove(0)
        .into_get_account_state_response()?;
    if let Some(account_state_blob) = account_state_proof.blob {
        let account_resource = get_account_resource_or_default(&Some(account_state_blob))?;
        Ok((account_resource.sequence_number(), AccountStatus::Persisted))
    } else {
        bail!("failed to get account state because account doesn't exist")
    }
}
fn handle_account_state_response ( future_resp : impl Future < Item = UpdateToLatestLedgerResponse , Error = failure :: Error > , ) -> Result < ( u64 , AccountStatus ) > { let mut response = future_resp . wait ( ) ? ; let account_state_proof = response . response_items . remove ( 0 ) . into_get_account_state_response ( ) ? ; if let Some ( account_state_blob ) = account_state_proof . blob { let account_resource = get_account_resource_or_default ( & Some ( account_state_blob ) ) ? ; Ok ( ( account_resource . sequence_number ( ) , AccountStatus :: Persisted ) ) } else { bail ! ( " " ) } }
Wait and process the response of account state request.
Wait and process the response of account state request .
future_resp
impl Future<Item = UpdateToLatestLedgerResponse, Error = failure::Error>