Skip to main content

hitbox_core/
lib.rs

1#![doc = include_str!("../README.md")]
2#![warn(missing_docs)]
3
4pub mod cacheable;
5pub mod context;
6pub mod extractor;
7pub mod key;
8pub mod label;
9pub mod offload;
10pub mod policy;
11pub mod predicate;
12pub mod request;
13pub mod response;
14pub mod upstream;
15pub mod value;
16
17pub use cacheable::Cacheable;
18pub use context::{
19    BoxContext, CacheContext, CacheStatus, CacheStatusExt, Context, ReadMode, ResponseSource,
20    finalize_context,
21};
22pub use extractor::Extractor;
23pub use key::{CacheKey, KeyPart, KeyParts};
24pub use label::BackendLabel;
25pub use offload::{DisabledOffload, Offload};
26pub use policy::{CachePolicy, EntityPolicyConfig};
27pub use predicate::{And, Neutral, Not, Or, Predicate, PredicateExt, PredicateResult};
28pub use request::{CacheablePolicyData, CacheableRequest, RequestCachePolicy};
29pub use response::{CacheState, CacheableResponse, ResponseCachePolicy};
30#[doc(hidden)]
31pub use smallbox::space::S4;
32#[doc(hidden)]
33pub use smol_str::SmolStr;
34pub use upstream::Upstream;
35pub use value::CacheValue;
36
37/// Raw byte data type used for serialized cache values.
38/// Using `Bytes` provides efficient zero-copy cloning via reference counting.
39pub type Raw = bytes::Bytes;