Skip to main content

Module reply

Module reply 

Source
Expand description

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).

Functions§

reply_call
The expression turning the handler’s output out into Result<T::Reply, BoxError>:
rewrite_opaque_returns
Appends + use<> to every opaque type in sig’s return position, inside an async fn’s return type included, so a reply outlives the call: on edition 2024 an opaque return type captures &self’s lifetime whatever the hidden type borrows.
rewrite_opaque_returns_in
rewrite_opaque_returns for a handler of a generic controller, whose impl’s type and const parameters are in scope of every opaque return type and so must be named in its use<..>: appends + use<T, N, ..> listing them. #[handlers] calls it before the transport attribute expands, which then finds a use<..> and leaves the type as written; the transport attribute sees the method alone and cannot learn the impl’s parameters.