#[filter]
Expand description
Filters requests based on a boolean condition.
The function continues execution only if the provided code block returns true
.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[filter(ctx.get_request().await.is_ws())]
async fn handle_ws(ctx: Context) {
// This code will only run for WebSocket requests.
}