viz-macros

Crates.ioviz-macros
lib.rsviz-macros
version0.2.0
sourcesrc
created_at2022-07-16 13:25:27.838369
updated_at2023-12-14 22:59:10.500161
descriptionThe proc macros for Viz
homepagehttps://viz.rs
repositoryhttps://github.com/viz-rs/viz
max_upload_size
id626697
size12,198
Fangdun Tsai (fundon)

documentation

https://docs.rs/viz-macros

README

Viz

Macros for Viz

Safety! Docs.rs docs Crates.io version Download

Macros

Macro Description
handler Extended Handler with Extractors

Example

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)
}

License

This project is licensed under the MIT license.

Author

Commit count: 462

cargo fmt