[][src]Function lagoinha::get_address

pub async fn get_address(
    cep: &str,
    error_timeout: Option<u64>
) -> Result<Address, Error>

get_address runs concurent calls to available services requesting the address related to the provided cep, and with a error_timeout in seconds in case some services fail.

Arguments

  • cep - A str pointer slice that holds the Brazilian postal code.
  • error_timeout - Option timeout in seconds in case some services come to fail. It defaults to 2 if None is provided, and has a minimum value of 1. This prevents early failures from canceling possible success resuts from other seervices.