viz-router

Crates.ioviz-router
lib.rsviz-router
version
sourcesrc
created_at2020-06-28 00:41:45.99263
updated_at2024-10-03 05:57:57.315221
descriptionThe router for Viz
homepagehttps://viz.rs
repositoryhttps://github.com/viz-rs/viz
max_upload_size
id258956
Cargo.toml error:TOML parse error at line 20, column 1 | 20 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Fangdun Tsai (fundon)

documentation

https://docs.rs/viz-router

README

Viz

Robust Routing for Viz

Safety! Docs.rs docs Crates.io version Download

Example

use viz_core::{IntoHandler, IntoResponse, Response, Result, Request};
use viz_router::{get, Router};

async fn index() -> Result<impl IntoResponse> {
  Ok(())
}

async fn ws(_: Request) -> Result<Response> {
  Ok(())
}

let app = Router::new()
    .route("/", get(index.into_handler()))
    .route("/ws/:name", get(ws));

License

This project is licensed under the MIT license.

Author

Commit count: 462

cargo fmt