pre_upgrade_hook

Attribute Macro pre_upgrade_hook 

Source
#[pre_upgrade_hook]
Expand description

Registers a function as a pre-upgrade hook.

This attribute macro registers the decorated function to be executed before a connection is upgraded (e.g., to WebSocket). This macro requires the #[hyperlane(server: Server)] macro to be used to define the server instance.

§Usage

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

#[pre_upgrade_hook]
async fn handle_pre_upgrade(ctx: Context) {
    // Pre-upgrade logic
}

§Dependencies

This macro depends on the #[hyperlane(server: Server)] macro to define the server instance.