1#![warn(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
9#![warn(missing_docs)]
10
11#[cfg(all(feature = "workers", feature = "redis"))]
13compile_error!(
14 "features `workers` and `redis` are mutually exclusive — Workers runtime cannot use fred"
15);
16
17#[cfg(all(feature = "workers", feature = "l1"))]
18compile_error!("features `workers` and `l1` are mutually exclusive — moka requires std threads unavailable in wasm32");
19
20#[cfg(all(feature = "workers", feature = "memcached"))]
21compile_error!("features `workers` and `memcached` are mutually exclusive — Workers runtime has no TCP sockets");
22
23#[cfg(all(feature = "workers", feature = "file"))]
24compile_error!(
25 "features `workers` and `file` are mutually exclusive — Workers runtime has no filesystem"
26);
27
28pub mod backend;
31pub mod client;
33pub mod config;
35pub mod error;
37pub mod interop;
39pub mod metrics;
41pub mod serializer;
43pub mod session;
45pub mod url_validator;
47
48mod intents;
50
51#[cfg(feature = "encryption")]
53pub mod encryption;
54
55#[cfg(feature = "l1")]
57pub mod l1;
58
59pub use client::{CacheKit, CacheKitBuilder, SharedBackend};
61pub use config::CachekitConfig;
62pub use error::{BackendError, BackendErrorKind, CachekitError};
63
64#[cfg(feature = "encryption")]
65pub use client::SecureCache;
66#[cfg(feature = "encryption")]
67pub use encryption::EncryptionLayer;
68
69#[cfg(feature = "macros")]
70pub use cachekit_macros::cachekit;
71
72pub mod prelude {
74 pub use crate::{
75 BackendError, BackendErrorKind, CacheKit, CacheKitBuilder, CachekitConfig, CachekitError,
76 };
77
78 #[cfg(feature = "encryption")]
79 pub use crate::{EncryptionLayer, SecureCache};
80
81 #[cfg(feature = "macros")]
82 pub use crate::cachekit;
83}