#[http3]Expand description
Restricts function execution to HTTP/3 requests only.
This attribute macro ensures the decorated function only executes for HTTP/3 protocol requests, the latest version of the HTTP protocol.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[route("/http3")]
struct Http3;
impl ServerHook for Http3 {
async fn new(_ctx: &Context) -> Self {
Self
}
#[prologue_macros(http3, response_body("http3"))]
async fn handle(self, ctx: &Context) {}
}
impl Http3 {
#[http3]
async fn http3_with_ref_self(&self, ctx: &Context) {}
}
#[http3]
async fn standalone_http3_handler(ctx: &Context) {}The macro takes no parameters and should be applied directly to async functions
that accept a &Context parameter.