attributes

Attribute Macro attributes 

Source
#[attributes]
Expand description

Extracts all attributes into a HashMap variable.

This attribute macro retrieves all available attributes from the request context and makes them available as a HashMap for comprehensive attribute access.

ยงUsage

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

#[attributes(all_attrs)]
async fn handle_with_all_attributes(ctx: Context) {
    for (key, value) in all_attrs {
        // Process each attribute
    }
}

The macro accepts a variable name that will contain a HashMap of all attributes. The variable will be available as a HashMap in the function scope.