http2

Attribute Macro http2 

Source
#[http2]
Expand description

Restricts function execution to HTTP/2 requests only.

This attribute macro ensures the decorated function only executes for HTTP/2 protocol requests.

ยงUsage

use hyperlane::*;
use hyperlane_macros::*;

#[http2]
async fn handle_http2(ctx: Context) {
    // Handle HTTP/2 requests
}

The macro takes no parameters and should be applied directly to async functions that accept a Context parameter.