#[http3_version]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_version")]
struct Http3;
impl ServerHook for Http3 {
async fn new(_ctx: &Context) -> Self {
Self
}
#[prologue_macros(http3_version, response_body("http3_version"))]
async fn handle(self, ctx: &Context) {}
}
impl Http3 {
#[http3_version]
async fn http3_version_with_ref_self(&self, ctx: &Context) {}
}
#[http3_version]
async fn standalone_http3_version_handler(ctx: &Context) {}The macro takes no parameters and should be applied directly to async functions
that accept a &Context parameter.