Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/myfavshrimp/axum_route_helper

A declarative macro to help with axum route captures and wildcards
https://github.com/myfavshrimp/axum_route_helper

Last synced: 6 days ago
JSON representation

A declarative macro to help with axum route captures and wildcards

Awesome Lists containing this project

README

        

# axum route helper

```rust
route!(SomeRoute => "/path/{}/with/{}", (:something: String, *parameter: u8));

assert_eq!(
SomeRoute::handler_route(),
"/path/:something/with/*parameter"
);

assert_eq!(
SomeRoute::route_path(String::from("test"), 13),
"/path/test/with/13"
);
```