Crate gemfra_codegen

source ·
Expand description

Macros for gemfra

route macro

A macro that allows you to write routes for a RoutedApp.

use gemfra::{
    response::Response,
    request::Request,
    error::AnyError,
};
use gemfra_codegen::route;

#[route("/foo/:bar")]
async fn my_route(request: Request, bar: &str) -> Result<Response, AnyError> {
    todo!()
}

Attribute Macros

Convert the provided route into a struct that implements Route.