#[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: &mut Context) -> Self {
Self
}
#[aborted]
async fn handle(self, ctx: &mut Context) {}
}
impl Aborted {
#[aborted]
async fn aborted_with_ref_self(&self, ctx: &mut Context) {}
}
#[aborted]
async fn standalone_aborted_handler(ctx: &mut Context) {}The macro takes no parameters and should be applied directly to async functions
that accept a &mut Context parameter.