1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//! The Arcature application DX layer.
//!
//! This module hosts the *runtime* contracts that the `arcature-macros`
//! proc-macro crate's DSL macros generate code against. The proc-macro
//! crate itself depends on no Arcature runtime crate; its expansions
//! reference these types through absolute `::arcature::` paths, which
//! resolve in the downstream application crate (which has `arcature` on
//! its dependency graph).
//!
//! The module is gated behind the `dx` Cargo feature. Enabling `dx` pulls
//! in the `arcature-macros` DSL macros (re-exported at the crate root:
//! `module!`, `application!`, `routes!`, `#[service]`, `#[resource]`,
//! `#[page]`, etc.) and the runtime contracts those macros generate
//! against.
//!
//! # Current surface
//!
//! - [`DxComponent`](crate::DxComponent) -- a marker trait with a static
//! `NAME`. `#[derive(DxComponent)]` generates an `impl DxComponent` with
//! the type name (or a custom name via `#[dx_component(name = "...")]`).
//! - [`ApplicationGraph`] -- the assembled module dependency graph, with
//! duplicate-module, unknown-import, and circular-dependency validation.
//! - [`ModuleDescriptor`] -- a single feature module's metadata (name,
//! imports, exports, controllers, services, policies, routes).
//! - [`GraphError`] -- typed errors from graph validation.
//! - [`RouteMethod`] / [`RouteDescriptor`] -- route metadata for the
//! `routes!` macro. Const-constructible, `&'static`-based.
//! - [`ControllerMethod`] -- controller method metadata for `#[controller]`.
//! Const-constructible: inspectable without running the application.
//! - [`Empty`] -- 204 No Content response (always available with `dx`).
//! - [`Json`] / [`Page`] -- high-level response types. Implement
//! `IntoResponse` so controllers return `Result<Json<T>>`,
//! `Result<Empty>`, `Result<Page<T>>` without manual plumbing.
//! - [`RouteModel`] -- a deliberate model-binding contract (behind `dx`
//! and `database`). A type implementing `RouteModel` can be loaded from
//! the database by a route parameter. Binding does NOT imply
//! authorization.
//! - [`Bound`] -- a genuine Axum extractor that loads a model by route
//! param (behind `dx` + `database` + `api`). Returns 404 `Problem` on
//! miss, 400 on malformed key, 500 on DB error.
//! - [`Resolve`] -- typed application resource resolution. A type
//! implementing `Resolve<S>` can be constructed from application state
//! `S` -- cheaply, at compile time, with no runtime container.
//! `#[service]` generates `impl Resolve<S>`; Arcature provides impls
//! for built-in resources (`Db`).
//! - [`Service`] -- a marker for service types. Extends `DxComponent`
//! with `DEPS` metadata -- the dependency type names. Service
//! dependency cycles are impossible by construction (value composition).
//! - [`Inject`] -- an Axum extractor that constructs any `T: Resolve<S>`
//! from application state. Axum remains the handler runtime.
//! - [`Provider`] -- a marker for startup-constructed application
//! resources. Carries `Error` and `DEPS`. The developer writes the init
//! logic (business behavior, not mechanical plumbing).
//! - [`Command`] / [`CommandRegistry`] -- typed application commands
//! dispatched by name through `CommandRegistry::run`. `#[command]`
//! generates the `Command` impl; `CommandRegistry::register_command`
//! wires it up.
//! - [`RequestCache`] / [`RequestCacheKey`] -- the per-request memo store
//! `#[request_cache]` resolves through. An Axum extractor backed by the
//! request's own extensions, so a memo cannot outlive or escape the
//! request that produced it.
//! - [`RequestCacheDescriptor`] -- the compile-time half of the same
//! feature: what the UAG records about a memoized resolver.
pub use ;
pub use Bound;
pub use ;
pub use ;
pub use DbFromState;
pub use ;
pub use CacheFromState;
pub use EventsFromState;
pub use JobsFromState;
pub use MailFromState;
pub use StorageFromState;
// The A12 binding descriptors (`JobBinding`, `CommandBinding`, and the
// re-exported `ListenerBinding` / `ScheduleBinding` / `ScheduleCadence`)
// are pure compile-time metadata defined in `graph` (behind `dx` only),
// exactly like `ListenerBinding`. They are re-exported UNGATED (under `dx`)
// so the UAG can serialize them WITHOUT pulling the
// `jobs` runtime subsystem -- which drags in `database`/`chrono`/`tokio-util`
// (small apps remain small). The runtime types (`Scheduler`, `Worker`, ...)
// stay behind `jobs` in their own submodules.
pub use ;
// Re-export the runtime-owned binding types so `crate::dx::*` is the single
// entry point for all module-graph binding metadata.
pub use crateListenerBinding;
pub use Provider;
pub use RequestCacheDescriptor;
pub use ;
pub use Resolve;
pub use ;
pub use ;
pub use RouteModel;
pub use ;