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
//! # rainier-support
//!
//! The primitives every other Rainier crate shares, and nothing else. It sits
//! at the bottom of the dependency graph and depends on no other Rainier crate,
//! which is what lets the components above it stay independent of each other.
//!
//! - [`Error`] / [`Result`] — one error type, carrying the status and the
//! structured details the HTTP layer needs to render any failure.
//! - [`Extensions`] — the type-keyed bag behind request attributes and
//! container bindings.
//! - [`str`](mod@str) — the inflection vocabulary resource routing and the code
//! generators are written against.
//! - [`Setting`] / [`setting_enum!`] — a closed set of config values, so a
//! driver name is an enum rather than a string nobody validates.
//! - [`BoxFuture`] — the boxed future the framework's `dyn`-safe async traits
//! return.
pub use BuildInfo;
pub use ;
pub use Extensions;
pub use Setting;
/// What [`setting_enum!`] expands to. Not a stable API.
///
/// Re-exporting `serde` here is what lets a crate declare a setting without
/// naming serde in its own manifest — the macro reaches it through `$crate`.
use Future;
use Pin;
/// A heap-allocated, `Send` future — the return type of every `dyn`-safe async
/// method in the framework.
///
/// Rust's `async fn` in traits produces an unnameable opaque type, which cannot
/// be put behind `dyn`. Every Rainier contract that needs to be a trait object
/// (middleware, queue drivers, mail transports, auth guards) therefore returns
/// this instead. Where a contract does *not* need to be a trait object it uses
/// plain `async fn` and stays allocation-free.
pub type BoxFuture<'a, T> = ;
/// A `'static` [`BoxFuture`], for futures that outlive the call that made them
/// (a spawned job, a queued listener).
pub type BoxedFuture<T> = ;
/// A boxed future that is **not** `Send`, and so cannot cross threads.
///
/// Used for the few contracts that wrap something inherently thread-bound —
/// notably the escape hatch onto Rainier ORM's own `Executor` API, whose futures
/// hold `sea_query` statements (and therefore `Rc`) across their awaits. Code
/// on the request path should never need this; a handler's future must be
/// `Send` for the server to spawn it.
pub type LocalBoxFuture<'a, T> = ;
/// Box a future into a [`BoxFuture`]. Sugar for `Box::pin`, named so call
/// sites read as intent rather than allocation.
/// The framework's prelude: what nearly every module wants in scope.