Crates.io | viz-macros |
lib.rs | viz-macros |
version | 0.2.0 |
source | src |
created_at | 2022-07-16 13:25:27.838369 |
updated_at | 2023-12-14 22:59:10.500161 |
description | The proc macros for Viz |
homepage | https://viz.rs |
repository | https://github.com/viz-rs/viz |
max_upload_size | |
id | 626697 |
size | 12,198 |
Macros for Viz
Macro | Description |
---|---|
handler | Extended Handler with Extractors |
use viz::{IntoResponse, Result, types::{Params}};
use viz_macros::handler;
#[handler]
fn about() -> impl IntoResponse {
}
#[handler]
async fn index() -> impl IntoResponse {
()
}
#[handler]
async fn get_user(Params(name): Params<String>) -> Result<impl IntoResponse> {
Ok(name)
}
This project is licensed under the MIT license.