#[send]
Expand description
Automatically sends the complete response after function execution.
This attribute macro ensures that the response (request headers and body) is automatically sent to the client after the function completes execution.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[send]
async fn auto_send_handler(ctx: Context) {
let _ = ctx.set_response_body("Hello World").await;
// Response is automatically sent after function returns
}
The macro takes no parameters and should be applied directly to async functions
that accept a Context
parameter.