pub struct Record {
pub zip_code: &'static str,
pub zip_code_type: Type,
pub city: &'static str,
pub state: &'static str,
pub coordinates: Option<(f64, f64)>,
pub is_decommissioned: bool,
pub tax_returns_filed: Option<u64>,
pub estimated_population: Option<u64>,
pub total_wages: Option<u64>,
}
#[derive(Clone, Debug)]
pub enum Type {
Standard,
PoBox,
Unique,
Military,
}
include!(concat!(env!("OUT_DIR"), "/codegen.rs"));
pub type Map = phf::Map<&'static str, Record>;
#[inline]
pub fn map() -> &'static Map {
&ZIP_CODES
}
#[inline]
pub fn by_city(city: &str) -> Option<Vec<&Record>> {
Some(
CITY_MAP
.get(city)?
.iter()
.map(|x| ZIP_CODES.get(*x).unwrap())
.collect(),
)
}