arcature 2026.2.0

Arcature application framework: a high-level Application facade over the certified Arcature subsystems, with the low-level Axum/Tower escape hatch preserved.
Documentation
//! `RequestCacheDescriptor` — compile-time metadata for a `#[request_cache]`
//! resolver (AP2.1-7).
//!
//! A sibling to `AuthUser`: this is the *compile-time* contract the
//! `#[request_cache]` proc-macro generates against. The *runtime* container
//! lives in `crate::request_cache` (a separate top-level module); this
//! descriptor is pure data — a `&'static` const aggregated into the
//! Unified Application Graph by `arcature-build` so the Inspector,
//! `arc check`, and the MCP `system_checks` tool can show per-request
//! memoized resolvers without running the application.
//!
//! # No runtime here
//!
//! This module carries NO runtime behavior — no `RequestCache`, no
//! memoization, no locking. It is metadata only, matching the one-file-one-
//! responsibility law: the descriptor (this file) and the runtime
//! (`crate::request_cache`) are separate concerns. A small app that enables
//! `dx` but not `request-cache` gets the descriptor (so the UAG can record
//! declared resolvers) without the runtime.
//!
//! # Example
//!
//! ```ignore
//! // Generated by `#[request_cache]` in arcature-dx:
//! pub const LOAD_PROFILE_REQUEST_CACHE: ::arcature::RequestCacheDescriptor =
//!     ::arcature::RequestCacheDescriptor {
//!         name: "load_profile",
//!         key_fields: &["user_id"],
//!     };
//! ```

/// Compile-time metadata for a per-request memoized resolver.
///
/// The `#[request_cache]` proc-macro generates a `pub const <NAME>_REQUEST_CACHE:
/// RequestCacheDescriptor` for each annotated resolver. The descriptor records
/// the resolver's name and the names of the parameters that form its cache key,
/// so the UAG / Inspector can show "this resolver is memoized per request by
/// `<key_fields>`" without running the resolver.
///
/// The fields are `&'static` so the descriptor is `const`-constructible and
/// lives in the binary (no allocation). A descriptor is *declarative* — it
/// does not cause memoization; the runtime container (`crate::request_cache`)
/// does the memoization. The descriptor is what the graph records.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct RequestCacheDescriptor {
    /// The resolver's name (typically the function name).
    pub name: &'static str,
    /// The names of the parameters that form the cache key, in declaration
    /// order. A single-field key is the common case; a composite key lists
    /// each constituent field name.
    pub key_fields: &'static [&'static str],
}