#[aborted]Expand description
Handles aborted request scenarios.
This attribute macro configures the function to handle cases where the client has aborted the request, providing appropriate handling for interrupted or cancelled requests.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[route("/aborted")]
struct Aborted;
impl ServerHook for Aborted {
async fn new(_ctx: &Context) -> Self {
Self
}
#[aborted]
async fn handle(self, ctx: &Context) {}
}
impl Aborted {
#[aborted]
async fn aborted_with_ref_self(&self, ctx: &Context) {}
}
#[aborted]
async fn standalone_aborted_handler(ctx: &Context) {}The macro takes no parameters and should be applied directly to async functions
that accept a &Context parameter.