h2c

Attribute Macro h2c 

Source
#[h2c]
Expand description

Restricts function execution to HTTP/2 Cleartext (h2c) requests only.

This attribute macro ensures the decorated function only executes for HTTP/2 cleartext requests that use the h2c upgrade mechanism.

ยงUsage

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

#[h2c]
async fn handle_h2c(ctx: Context) {
    // Handle HTTP/2 cleartext requests
}

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