1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! A tool to easily work with timezone lookups.
//!
//! # Examples
#![cfg_attr(
    feature = "tz-ned",
    doc = r##"
```
use rtzlib::NedTimezone;
use rtzlib::CanPerformGeoLookup;

// Query a time zone for a given `(lng,lat)`.
assert_eq!(
    NedTimezone::lookup(-121., 46.)[0]
        .identifier
        .as_ref()
        .unwrap(),
    "America/Los_Angeles"
);
```
"##
)]
// Directives.
#![warn(rustdoc::broken_intra_doc_links, rust_2018_idioms, clippy::all, missing_docs)]
#![allow(incomplete_features)]
#![feature(async_closure)]
#![feature(test)]
#![feature(string_remove_matches)]
#![feature(fs_try_exists)]
#![allow(stable_features)]
#![feature(once_cell)]

// Modules.

pub mod geo;
pub mod shared;
pub use crate::geo::shared::CanPerformGeoLookup;

#[cfg(feature = "tz-ned")]
pub use rtz_core::geo::tz::ned::NedTimezone;

#[cfg(feature = "tz-osm")]
pub use rtz_core::geo::tz::osm::OsmTimezone;

#[cfg(feature = "admin-osm")]
pub use rtz_core::geo::admin::osm::OsmAdmin;

#[cfg(feature = "wasm")]
pub mod wasm;

#[cfg(feature = "web")]
pub mod web;
#[cfg(feature = "web")]
pub use crate::web::server_start;