postcode 0.1.1

Postcode & Geolocation API for the UK
Documentation
1
2
3
4
5
6
7
8
9
10
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);
}