| Crates.io | vidi-router |
| lib.rs | vidi-router |
| version | 0.1.0 |
| created_at | 2025-12-06 20:19:57.33645+00 |
| updated_at | 2025-12-06 20:19:57.33645+00 |
| description | The router for Vidi |
| homepage | https://vidi.viz.rs |
| repository | https://github.com/viz-rs/vidi |
| max_upload_size | |
| id | 1970707 |
| size | 72,999 |
Robust Routing for Vidi
use vidi_core::{IntoHandler, IntoResponse, Response, Result, Request};
use vidi_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.