#[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::*;
#[response_middleware(2)]
struct ResponseMiddleware2;
impl ServerHook for ResponseMiddleware2 {
async fn new(_ctx: &Context) -> Self {
Self
}
#[epilogue_macros(send, flush)]
async fn handle(self, ctx: &Context) {}
}The macro takes no parameters and should be applied directly to async functions
that accept a &Context parameter.