Crate postcode[−][src]
Expand description
postcode-rs
Postcode & Geolocation API for the UK. This is an API client for postcodes.io.
postcode = "0.1.1"
Example
use postcode::Postcode; #[async_std::main] async fn main() { let code = "SW1W0NY"; let post = Postcode::from_code(code).await.unwrap(); println!("{} ({}, {}) -> ({}, {})", code, post.region, post.country, post.latitude, post.longitude); }
SW1W0NY (London, England) -> (51.495373, -0.147421)
Structs
Enums
Functions
Validate a UK postcode.