ulo_handler_codegen/lib.rs
1//! A plain library of `syn` functions every transport's attribute macro calls, and `#[handlers]`
2//! with them: parameter analysis, the body-consumer check, the reply probe, the `use<>` rewrite on
3//! streaming returns, the `__handler` protocol, key and shared-value emission, the `#[meta]`
4//! transport probe (X24), and the `cfg` gates `#[handlers]` copies from a handler (transports
5//! DESIGN ยง1). Not a proc-macro crate, so a
6//! user-written transport's macro crate depends on it as the shipped ones do.
7//!
8//! A transport attribute's expansion, in order:
9//! 1. [`protocol::take_handler_attr`] removes and parses the `__handler` tokens `#[handlers]`
10//! appended; their absence means the attribute sits outside a `#[handlers]` impl.
11//! 2. [`params::analyze`] reads the receiver and the parameters.
12//! 3. [`reply::rewrite_opaque_returns`] appends `+ use<>` to the return position's opaque types.
13//! 4. The transport builds its handler value around [`emit::call_closure`], and
14//! [`emit::MountFn::emit`] writes the three items the protocol owes.
15//! 5. [`restore::restore_attrs`] puts the input's own attribute groups back into the expansion.
16
17pub mod body;
18pub mod cfg;
19pub mod emit;
20pub mod keys;
21pub mod params;
22pub mod paths;
23pub mod protocol;
24pub mod reply;
25pub mod restore;
26pub mod shared;
27pub mod util;
28
29pub use paths::Paths;