#[reject]
Expand description
Rejects requests based on a boolean condition.
The function continues execution only if the provided code block returns false
.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[reject(ctx.get_request().await.is_http())]
async fn handle_non_http(ctx: Context) {
// This code will not run for HTTP requests.
}