Crates.io | viz-router |
lib.rs | viz-router |
version | |
source | src |
created_at | 2020-06-28 00:41:45.99263 |
updated_at | 2024-10-03 05:57:57.315221 |
description | The router for Viz |
homepage | https://viz.rs |
repository | https://github.com/viz-rs/viz |
max_upload_size | |
id | 258956 |
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` |
size | 0 |
Robust Routing for Viz
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));
This project is licensed under the MIT license.