pub struct Geo<'a> { /* private fields */ }Expand description
Geo route, from Client::geo.
Implementations§
Source§impl<'a> Geo<'a>
impl<'a> Geo<'a>
Sourcepub async fn catalog(&self) -> Result<GeoCatalog>
pub async fn catalog(&self) -> Result<GeoCatalog>
Every region, sub-region and country, with the codes a geo ban takes. Any key may
read it, a zone key too. Core marks the answer cacheable for a day
(Cache-Control: private, max-age=86400).
GET /api/v1/geo
§Examples
let catalog = client.geo().catalog().await?;
let hr = catalog.parse_area("HR")?;
println!("{}", catalog.describe(hr)); // Country Croatia (191)Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Geo<'a>
impl<'a> !UnwindSafe for Geo<'a>
impl<'a> Freeze for Geo<'a>
impl<'a> Send for Geo<'a>
impl<'a> Sync for Geo<'a>
impl<'a> Unpin for Geo<'a>
impl<'a> UnsafeUnpin for Geo<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more