Expand description
A plain library of syn functions every transport’s attribute macro calls, and #[handlers]
with them: parameter analysis, the body-consumer check, the reply probe, the use<> rewrite on
streaming returns, the __handler protocol, key and shared-value emission, the #[meta]
transport probe (X24), and the cfg gates #[handlers] copies from a handler (transports
DESIGN §1). Not a proc-macro crate, so a
user-written transport’s macro crate depends on it as the shipped ones do.
A transport attribute’s expansion, in order:
protocol::take_handler_attrremoves and parses the__handlertokens#[handlers]appended; their absence means the attribute sits outside a#[handlers]impl.params::analyzereads the receiver and the parameters.reply::rewrite_opaque_returnsappends+ use<>to the return position’s opaque types.- The transport builds its handler value around
emit::call_closure, andemit::MountFn::emitwrites the three items the protocol owes. restore::restore_attrsputs the input’s own attribute groups back into the expansion.
Re-exports§
pub use paths::Paths;
Modules§
- body
- The single body consumer, checked at compile time and naming both parameters (transports DESIGN §2.2).
- cfg
- The attributes that decide whether a handler, or one of its enhancer entries, is compiled,
which
#[handlers]copies onto every item it writes that names the handler’s generated items, and the reading of a method’s attributes throughcfg_attr. - emit
- The items a transport attribute owes
#[handlers]for one handler (seecrate::protocol). - keys
- Transport keys (transports DESIGN §2.1, X1): the constant each transport attribute emits per
handler, and the assertions
#[handlers]emits over every controller-level scoped key. - params
- Parameter analysis: a handler’s receiver and its parameters, each read from the call by type (transports DESIGN §2.2, §2.3).
- paths
- protocol
- The hidden
__handlerprotocol between#[handlers]and a transport’s handler attribute (transports DESIGN §2.1, §2.5, X1, X2). - reply
- The reply side of a handler: the probe that sends every error side to the error handlers
whatever the return type is spelled as, and the
+ use<>rewrite on streaming returns (transports DESIGN §2.3). - restore
- Puts the input’s own attribute groups back into an expansion that went through
syn. - shared
- Impl-level shared values (transports DESIGN §2.1, X2).
- util
- Helpers every macro built on this crate uses,
ulo-macrosincluded.