rtzlib/
lib.rs

1//! A tool to easily work with timezone lookups.
2//!
3//! # Examples
4#![cfg_attr(
5    feature = "tz-ned",
6    doc = r##"
7```
8use rtzlib::NedTimezone;
9use rtzlib::CanPerformGeoLookup;
10
11// Query a time zone for a given `(lng,lat)`.
12assert_eq!(
13    NedTimezone::lookup(-121., 46.)[0]
14        .identifier
15        .as_ref()
16        .unwrap(),
17    "America/Los_Angeles"
18);
19```
20"##
21)]
22// Directives.
23#![warn(rustdoc::broken_intra_doc_links, rust_2018_idioms, clippy::all, missing_docs)]
24#![allow(incomplete_features)]
25#![allow(stable_features)]
26// #![feature(async_closure)]
27// #![feature(test)]
28// #![feature(string_remove_matches)]
29// #![feature(fs_try_exists)]
30// #![feature(once_cell)]
31
32// Modules.
33
34pub mod geo;
35pub mod shared;
36pub use crate::geo::shared::CanPerformGeoLookup;
37
38#[cfg(feature = "tz-ned")]
39pub use rtz_core::geo::tz::ned::NedTimezone;
40
41#[cfg(feature = "tz-osm")]
42pub use rtz_core::geo::tz::osm::OsmTimezone;
43
44#[cfg(feature = "admin-osm")]
45pub use rtz_core::geo::admin::osm::OsmAdmin;
46
47#[cfg(feature = "wasm")]
48pub mod wasm;
49
50#[cfg(feature = "web")]
51pub mod web;
52#[cfg(feature = "web")]
53pub use crate::web::server_start;