#[hyperlane]
Expand description
Creates a new Server instance with the specified variable name.
This attribute macro generates a Server instance initialization at the beginning of the function with the specified variable name.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[hyperlane(server)]
async fn handle_request(ctx: Context) {
// server is now available as: let server: Server = Server::new();
// Function body can use server
}
The macro accepts a variable name as parameter. The variable will be available as a Server instance in the function scope.