h3o_mvt/
lib.rs

1//! Building blocks for rendering H3 datasets into vector tiles.
2
3// Lints {{{
4
5#![deny(
6    nonstandard_style,
7    rust_2018_idioms,
8    rust_2021_compatibility,
9    future_incompatible,
10    rustdoc::all,
11    rustdoc::missing_crate_level_docs,
12    missing_docs,
13    unsafe_code,
14    unused,
15    unused_import_braces,
16    unused_lifetimes,
17    unused_qualifications,
18    variant_size_differences,
19    warnings,
20    clippy::all,
21    clippy::cargo,
22    clippy::pedantic,
23    clippy::allow_attributes_without_reason,
24    clippy::as_underscore,
25    clippy::branches_sharing_code,
26    clippy::clone_on_ref_ptr,
27    clippy::cognitive_complexity,
28    clippy::create_dir,
29    clippy::dbg_macro,
30    clippy::debug_assert_with_mut_call,
31    clippy::decimal_literal_representation,
32    clippy::default_union_representation,
33    clippy::derive_partial_eq_without_eq,
34    clippy::empty_drop,
35    clippy::empty_line_after_outer_attr,
36    clippy::empty_structs_with_brackets,
37    clippy::equatable_if_let,
38    clippy::exhaustive_enums,
39    clippy::exit,
40    clippy::filetype_is_file,
41    clippy::float_cmp_const,
42    clippy::fn_to_numeric_cast_any,
43    clippy::format_push_string,
44    clippy::future_not_send,
45    clippy::get_unwrap,
46    clippy::if_then_some_else_none,
47    clippy::implicit_clone,
48    clippy::imprecise_flops,
49    clippy::iter_on_empty_collections,
50    clippy::iter_on_single_items,
51    clippy::iter_with_drain,
52    clippy::large_include_file,
53    clippy::let_underscore_must_use,
54    clippy::lossy_float_literal,
55    clippy::mem_forget,
56    clippy::missing_const_for_fn,
57    clippy::mixed_read_write_in_expression,
58    clippy::multiple_inherent_impl,
59    clippy::mutex_atomic,
60    clippy::mutex_integer,
61    clippy::needless_collect,
62    clippy::non_send_fields_in_send_ty,
63    clippy::nonstandard_macro_braces,
64    clippy::option_if_let_else,
65    clippy::or_fun_call,
66    clippy::panic,
67    clippy::path_buf_push_overwrite,
68    clippy::print_stderr,
69    clippy::print_stdout,
70    clippy::rc_buffer,
71    clippy::rc_mutex,
72    clippy::redundant_pub_crate,
73    clippy::rest_pat_in_fully_bound_structs,
74    clippy::same_name_method,
75    clippy::self_named_module_files,
76    clippy::significant_drop_in_scrutinee,
77    clippy::str_to_string,
78    clippy::string_add,
79    clippy::string_lit_as_bytes,
80    clippy::string_slice,
81    clippy::suboptimal_flops,
82    clippy::suspicious_operation_groupings,
83    clippy::todo,
84    clippy::trailing_empty_array,
85    clippy::trait_duplication_in_bounds,
86    clippy::transmute_undefined_repr,
87    clippy::trivial_regex,
88    clippy::try_err,
89    clippy::type_repetition_in_bounds,
90    clippy::undocumented_unsafe_blocks,
91    clippy::unimplemented,
92    clippy::unnecessary_self_imports,
93    clippy::unneeded_field_pattern,
94    clippy::unseparated_literal_suffix,
95    clippy::unused_peekable,
96    clippy::unused_rounding,
97    clippy::unwrap_used,
98    clippy::use_debug,
99    clippy::use_self,
100    clippy::useless_let_if_seq,
101    clippy::verbose_file_reads
102)]
103#![allow(
104    // The 90’s called and wanted their charset back.
105    clippy::non_ascii_literal,
106    // "It requires the user to type the module name twice."
107    // => not true here since internal modules are hidden from the users.
108    clippy::module_name_repetitions,
109    // Usually yes, but not really applicable for most literals in this crate.
110    clippy::unreadable_literal,
111    // Too many irrelevant warning (about internal invariants).
112    clippy::missing_panics_doc,
113    reason = "allow some exceptions"
114)]
115
116// }}}
117
118mod error;
119mod render;
120mod tile;
121// TODO: if possible, try to reuse the implementation from h3o instead.
122mod ring_hierarchy;
123
124pub use error::{InvalidTileID, RenderingError};
125pub use render::{render, tiles_for_cell};
126pub use tile::TileID;