Skip to main content

cuckoo_clock/
lib.rs

1//! This crate provides a thread-safe, extended version of [Cuckoo filter], supporting TTL, LRU and
2//! custom counters associated with stored data.
3//!
4//! All the limitations of original Cuckoo filter still hold, meaning that all additional data is
5//! associated with the fingerprint, which may represent a completely different item. For that reason,
6//! it is recommended to only use associated data to manage the lifetime of the items, unless false
7//! positives are not problematic in your use-case.
8//!
9//! This implementation can be used as a regular Cuckoo filter, without the added features too.
10//!
11//! [Cuckoo filter]: https://www.cs.cmu.edu/~binfan/papers/conext14_cuckoofilter.pdf
12
13#![deny(clippy::fallible_impl_from)]
14#![deny(clippy::wildcard_enum_match_arm)]
15#![deny(clippy::unneeded_field_pattern)]
16#![deny(clippy::fn_params_excessive_bools)]
17#![deny(clippy::must_use_candidate)]
18#![deny(arithmetic_overflow)]
19#![deny(clippy::checked_conversions)]
20#![deny(clippy::cast_possible_truncation)]
21#![deny(clippy::cast_sign_loss)]
22#![deny(clippy::cast_possible_wrap)]
23#![deny(clippy::cast_precision_loss)]
24#![deny(clippy::unchecked_time_subtraction)]
25#![warn(clippy::unwrap_used)]
26#![warn(clippy::expect_used)]
27#![deny(clippy::panicking_unwrap)]
28#![deny(clippy::option_env_unwrap)]
29#![deny(clippy::uninit_vec)]
30#![deny(unnecessary_transmutes)]
31#![deny(clippy::transmute_ptr_to_ref)]
32#![deny(clippy::transmute_undefined_repr)]
33#![deny(clippy::missing_const_for_fn)]
34#![warn(missing_docs)]
35
36mod associated_data;
37mod bucket;
38pub mod config;
39mod data_block;
40mod exporter;
41mod filter;
42
43pub use {
44    associated_data::AssociatedData, bucket::InsertValues, bucket::LookupValues,
45    data_block::Fingerprint, exporter::CuckooFilterExporter, exporter::ExportError,
46    exporter::ExportableBuildHasher, exporter::ExportableRandomState, exporter::ImportError,
47    filter::CuckooFilter,
48};