h3o_ice/
lib.rs

1//! Frozen (aka read-only) sets and maps for H3 cell index.
2//!
3//! Those data structures are built on top of finite state transducers, which
4//! allows them to be extremely compact while offering fast lookup.
5//!
6//! This is especially for read-only indexes (both in-memory or on-disk).
7
8// Lints {{{
9
10#![deny(
11    nonstandard_style,
12    rust_2018_idioms,
13    rust_2021_compatibility,
14    future_incompatible,
15    rustdoc::all,
16    rustdoc::missing_crate_level_docs,
17    missing_docs,
18    unsafe_code,
19    unused,
20    unused_import_braces,
21    unused_lifetimes,
22    unused_qualifications,
23    variant_size_differences,
24    warnings,
25    clippy::all,
26    clippy::cargo,
27    clippy::pedantic,
28    clippy::allow_attributes_without_reason,
29    clippy::as_underscore,
30    clippy::branches_sharing_code,
31    clippy::clone_on_ref_ptr,
32    clippy::cognitive_complexity,
33    clippy::create_dir,
34    clippy::dbg_macro,
35    clippy::debug_assert_with_mut_call,
36    clippy::decimal_literal_representation,
37    clippy::default_union_representation,
38    clippy::derive_partial_eq_without_eq,
39    clippy::empty_drop,
40    clippy::empty_line_after_outer_attr,
41    clippy::empty_structs_with_brackets,
42    clippy::equatable_if_let,
43    clippy::exhaustive_enums,
44    clippy::exit,
45    clippy::filetype_is_file,
46    clippy::float_cmp_const,
47    clippy::fn_to_numeric_cast_any,
48    clippy::format_push_string,
49    clippy::future_not_send,
50    clippy::get_unwrap,
51    clippy::if_then_some_else_none,
52    clippy::imprecise_flops,
53    clippy::iter_on_empty_collections,
54    clippy::iter_on_single_items,
55    clippy::iter_with_drain,
56    clippy::large_include_file,
57    clippy::let_underscore_must_use,
58    clippy::lossy_float_literal,
59    clippy::mem_forget,
60    clippy::missing_const_for_fn,
61    clippy::mixed_read_write_in_expression,
62    clippy::multiple_inherent_impl,
63    clippy::mutex_atomic,
64    clippy::mutex_integer,
65    clippy::needless_collect,
66    clippy::non_send_fields_in_send_ty,
67    clippy::nonstandard_macro_braces,
68    clippy::option_if_let_else,
69    clippy::or_fun_call,
70    clippy::panic,
71    clippy::path_buf_push_overwrite,
72    clippy::pattern_type_mismatch,
73    clippy::print_stderr,
74    clippy::print_stdout,
75    clippy::rc_buffer,
76    clippy::rc_mutex,
77    clippy::redundant_pub_crate,
78    clippy::rest_pat_in_fully_bound_structs,
79    clippy::same_name_method,
80    clippy::self_named_module_files,
81    clippy::significant_drop_in_scrutinee,
82    clippy::str_to_string,
83    clippy::string_add,
84    clippy::string_lit_as_bytes,
85    clippy::string_slice,
86    clippy::string_to_string,
87    clippy::suboptimal_flops,
88    clippy::suspicious_operation_groupings,
89    clippy::todo,
90    clippy::trailing_empty_array,
91    clippy::trait_duplication_in_bounds,
92    clippy::transmute_undefined_repr,
93    clippy::trivial_regex,
94    clippy::try_err,
95    clippy::type_repetition_in_bounds,
96    clippy::undocumented_unsafe_blocks,
97    clippy::unimplemented,
98    clippy::unnecessary_self_imports,
99    clippy::unneeded_field_pattern,
100    clippy::unseparated_literal_suffix,
101    clippy::unused_peekable,
102    clippy::unused_rounding,
103    clippy::unwrap_used,
104    clippy::use_debug,
105    clippy::use_self,
106    clippy::useless_let_if_seq,
107    clippy::verbose_file_reads
108)]
109#![allow(
110    // The 90’s called and wanted their charset back.
111    clippy::non_ascii_literal,
112    // "It requires the user to type the module name twice."
113    // => not true here since internal modules are hidden from the users.
114    clippy::module_name_repetitions,
115    // Usually yes, but not really applicable for most literals in this crate.
116    clippy::unreadable_literal,
117    reason = "allow some exceptions"
118)]
119
120// }}}
121
122mod error;
123mod key;
124mod map;
125mod set;
126
127pub use error::BuildError;
128pub use map::{
129    FrozenMap, FrozenMapBuilder, FrozenMapIterator, FrozenMapKeys,
130    FrozenMapValues,
131};
132pub use set::{FrozenSet, FrozenSetBuilder, FrozenSetIterator};
133
134use key::Key;