# hitbox-core
Core traits and types for the Hitbox asynchronous caching framework.
This crate provides the foundational abstractions that make Hitbox
**protocol-agnostic** and **extensible**. It defines the core traits
that protocol-specific implementations (like `hitbox-http`) and
backend implementations (like `hitbox-redis`, `hitbox-moka`) must implement.
## Architecture
Hitbox is built around a **Finite State Machine (FSM)** that orchestrates
cache operations. This crate provides the traits that the FSM uses to:
- **Decide** what to cache ([`Predicate`])
- **Generate** cache keys ([`Extractor`])
- **Bridge** protocol types with cache ([`CacheableRequest`], [`CacheableResponse`])
- **Call** upstream services ([`Upstream`])
- **Execute** background tasks ([`Offload`])
## Feature Flags
- `rkyv_format` - Enable rkyv zero-copy serialization support