| Crates.io | viz-router |
| lib.rs | viz-router |
| version | 0.10.0 |
| created_at | 2020-06-28 00:41:45.99263+00 |
| updated_at | 2024-12-28 08:05:33.396101+00 |
| description | The router for Viz |
| homepage | https://viz.rs |
| repository | https://github.com/viz-rs/viz |
| max_upload_size | |
| id | 258956 |
| size | 74,855 |
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.