Skip to main content

Crate mailwoman_client

Crate mailwoman_client 

Source
Expand description

Typed Rust clients for Mailwoman’s four HTTP surfaces — the three drop-in geocoding APIs plus the native /v1/* surface mailwoman serve ships.

Each submodule is generated at compile time by progenitor’s generate_api! proc-macro from the OpenAPI 3.0.3 document (the “diet” flavor — progenitor’s openapiv3 dependency only understands 3.0.x) vendored under openapi/ — nothing here is hand-written except the thin default-base_url constructors below. Regenerate with mailwoman clients generate; there is no code to hand-edit. See examples/basic.rs for a runnable call.

Modules§

libpostal
libpostal-compatible parse / expand client (/parse, /expand).
mailwoman
The native Mailwoman client (/v1/parse, /v1/geocode, /v1/batch, /v1/resolve, /v1/format).
nominatim
Nominatim-compatible geocoding client (/search, /reverse, /lookup, /status).
photon
Photon-compatible autocomplete / reverse geocoding client (/api, /reverse).

Constants§

LIBPOSTAL_LOCAL_BASE_URL
Default local npx @mailwoman/libpostal serve base URL.
MAILWOMAN_LOCAL_BASE_URL
Default local mailwoman serve base URL.
NOMINATIM_LOCAL_BASE_URL
Default local npx @mailwoman/nominatim serve base URL.
PHOTON_HOSTED_BASE_URL
The hosted public Photon trial endpoint (conservative rate limits). Only Photon has a hosted trial; the other three surfaces are self-host only.
PHOTON_LOCAL_BASE_URL
Default local npx @mailwoman/photon serve base URL.

Functions§

libpostal_local
A libpostal client pointed at a local serve server (LIBPOSTAL_LOCAL_BASE_URL).
mailwoman_local
A Mailwoman client pointed at a local mailwoman serve server (MAILWOMAN_LOCAL_BASE_URL).
nominatim_local
A Nominatim client pointed at a local serve server (NOMINATIM_LOCAL_BASE_URL).
photon_hosted
A Photon client pointed at the hosted public trial endpoint (PHOTON_HOSTED_BASE_URL).
photon_local
A Photon client pointed at a local serve server (PHOTON_LOCAL_BASE_URL).