extract_countries_batch

Function extract_countries_batch 

Source
pub fn extract_countries_batch<T: AsRef<str>>(
    phone_numbers: &[T],
) -> Vec<Option<&'static Country>>
Expand description

Extract countries for multiple phone numbers at once

§Arguments

  • phone_numbers - Slice of phone numbers to analyze

§Returns

  • Vec<Option<&'static Country>> - Vector of country data (None for invalid ones)

§Examples

use phonelib::extract_countries_batch;
 
let numbers = ["1234567890", "44123456789"];
let countries = extract_countries_batch(&numbers);
// Returns country data for each number